楼主: 飘洒
2304 3

关于《LInear models with R》中第九章中的一个问题 [推广有奖]

  • 3关注
  • 14粉丝

已卖:19份资源

博士生

94%

还不是VIP/贵宾

-

威望
0
论坛币
967 个
通用积分
29.1892
学术水平
2 点
热心指数
6 点
信用等级
0 点
经验
13700 点
帖子
433
精华
0
在线时间
286 小时
注册时间
2009-3-13
最后登录
2024-7-11

楼主
飘洒 发表于 2010-2-8 16:10:14 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
这几天在看linear models with R这本书,学到了不少实用东西,在学到第九章的shrinkage methods 时,遇到一些问题,希望和大家讨论一下。首先,在学习这本书的过程中,我觉得这本书上的东西与现在的R软件中的相比有一些过时了,书上的某些packaga在软件中没有,如mva ,pls.pcr等。我在练习书上的东西时,没找到pcr()和pls()这两个函数,(也许是我的方法不当吧,所以拿到论坛里来和大家讨论一下)。
如有熟悉这方面的朋友,可以讨论一下。谢谢!
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:models Linear Linea model near linear models with R LInear models

回帖推荐

dwl001 发表于2楼  查看完整内容

Have a look this website http://www.maths.bath.ac.uk/~jjf23/LMR/errata.html p139, package pls.pcr has been replaced with package pls in more recent versions of R. Last paragraph is now: The pls package can compute this CV. By default, the data is divided into ten parts for the CV: > pcrmod validationplot(pcrmod)p140, validationplot() above produces a slightly different plot for the right pa ...
It is not entirely satisfying but the alternatives are worse!
统计人

沙发
dwl001 发表于 2010-2-9 06:36:24
Have a look this website

http://www.maths.bath.ac.uk/~jjf23/LMR/errata.html

p139, package pls.pcr has been replaced with package pls in more recent versions of R. Last paragraph is now: The pls package can compute this CV. By default, the data is divided into ten parts for the CV: > pcrmod <- pcr(fat ~ ., data=meatspec[1:172,], validation="CV",ncomp=50)> validationplot(pcrmod)p140, validationplot() above produces a slightly different plot for the right panel of Figure 9.5. p141, The plsr() function now centers the predictors internally. So first sentence can now read "We now compute the PLS on all models up to size 50". The next chunk of R code becomes: > plsg <- plsr(fat ~ ., data=meatspec[1:172,], ncomp=50, validation="CV")> coefplot(plsg,ncomp=4,xlab="Frequency")> validationplot(plsg)The centering described in the last two sentences of p141 is now redundant. Last chunk of R code becomes: > ypred <- predict(plsg,ncomp=14)> rmse(ypred,meatspec$fat[1:172])p142, chunk of R code becomes: > ytpred <- predict(plsg,meatspec[173:215,],ncomp=14)> rmse(ytpred,meatspec$fat[173:215])Note also that Figure 9.7 is somewhat changed by using the plotting functions from the pls package.

藤椅
飘洒 发表于 2010-2-9 22:43:44
谢谢2楼的朋友的回复!
It is not entirely satisfying but the alternatives are worse!
统计人

板凳
m8843620 发表于 2011-5-27 16:10:45
谢谢楼主的分享

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2026-1-16 08:54