englianhu / report

🚄东方快车,🚄一带一路。分析财务产品盈亏报告、购物篮分析 https://gitee.com/englianhu
https://englianhu.wordpress.com
GNU General Public License v3.0
2 stars 1 forks source link

Statistical Computing with R (2nd Edition).pdf #8

Open englianhu opened 3 years ago

englianhu commented 3 years ago

[问答]求Statistical Computing with R 客课后答案

Pdf电子书:https://englianhu.files.wordpress.com/2020/10/statistical-computer-with-r-2nd-edition.pdf

englianhu commented 3 years ago

Extending the linear model with R.pdf

FB_IMG_1603960287053.jpg

https://github.com/robjhyndman/ETC3580/blob/master/Faraway%20(2016)%20Extending%20the%20linear%20model%20with%20R.pdf

englianhu commented 3 years ago

https://github.com/englianhu/report/issues/9#issue-733422198 here i tried to build random effects while noticed doesn't enhance my model.

#degree = 2
mm000 = lm(Profit ~ Date * 
              poly(Bettor, degree = 2, raw = FALSE) * 
              poly(Won, degree = 2, raw = FALSE) * 
              poly(Cancelled, degree = 2, raw = FALSE) * 
              poly(Rebates, degree = 2, raw = FALSE) * 
              (1 + Won * Cancelled | Bettor) * (Type / Date), smp2) %>% 
    extractAIC

mm001 = lm(Profit ~ Date * 
               poly(Bettor, degree = 2, raw = FALSE) * 
               poly(Won, degree = 2, raw = FALSE) * 
               poly(Cancelled, degree = 2, raw = FALSE) * 
               poly(Rebates, degree = 2, raw = FALSE) * 
               (1 + Won * Cancelled / Bettor) * (Type / Date), smp2) %>% 
    extractAIC
#degree = 3
mm002 = lm(Profit ~ Date * 
              poly(Bettor, degree = 3, raw = FALSE) * 
              poly(Won, degree = 3, raw = FALSE) * 
              poly(Cancelled, degree = 3, raw = FALSE) * 
              poly(Rebates, degree = 3, raw = FALSE) * 
              (1 + Won * Cancelled | Bettor) * (Type / Date), smp2) %>% 
    extractAIC

mm003 = lm(Profit ~ Date * 
               poly(Bettor, degree = 3, raw = FALSE) * 
               poly(Won, degree = 3, raw = FALSE) * 
               poly(Cancelled, degree = 3, raw = FALSE) * 
               poly(Rebates, degree = 3, raw = FALSE) * 
               (1 + Won * Cancelled / Bettor) * (Type / Date), smp2) %>% 
    extractAIC
englianhu commented 3 years ago

Explanation on random effects & nested lm via randomeffs2.pdf lm - random effects & nested model.jpg

englianhu commented 3 years ago

Advanced Linear Models for Data Science.pdf

englianhu commented 3 years ago

https://github.com/XiangyunHuang/r-bloggers/issues/54

englianhu commented 3 years ago

《R中的统计模型》 http://zx.sina.cn/abc/middle.d.html?type=blog&link=http%3A%2F%2Fblog.sina.cn%2Fdpool%2Fblog%2Fs%2Fblog_6b36e6750100t45l.html%3Fsinawapsharesource%3Dnewsapp

englianhu commented 3 years ago

Advanced Linear Models for Data Science.pdf

Regression Models for Data Science in R.pdf