找回密码
 注册
查看: 2122|回复: 0

R语言:step.gam()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-2-16 18:58:04 | 显示全部楼层 |阅读模式
step.gam(mgcv)
step.gam()所属R语言包:mgcv

                                        Alternatives to step.gam
                                         替代到step.gam的

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

There is no step.gam in package mgcv. The mgcv default for model selection is to use either prediction error criteria such as  GCV, GACV, Mallows' Cp/AIC/UBRE or the likelihood based methods of REML or ML.  Since the  smoothness estimation part of model selection is done in this way it is logically most consistent to perform the rest of model selection in the same way. i.e. to decide which terms to include or omit by looking at changes in GCV, AIC, REML etc.
有没有step.gam包mgcv。 mgcv模型选择默认的是GCV的,GACV,锦葵的CP / AIC / UBRE或基于REML法或ML的可能性方法如使用任何预测误差准则。由于模型选择平滑估计部分以这种方式完成的,它在逻辑上是最一致的执行模式的选择,在以同样的方式截断。即决定包括哪些条款或GCV的变化,工商局,REML法等省略

To facilitate fully automatic model selection the package implements two smooth modification techniques which can be used to allow smooths to be shrunk to zero as  part of smoothness selection.
为了方便全自动模式选择包实现平稳修改技术可用于允许平滑平滑选择部分被缩小到零。




Shrinkage smoothers are smoothers in which a small multiple of the identity matrix is added to the smoothing penalty, so that strong enough penalization will shrink all the  coefficients of the smooth to zero. Such smoothers can effectively be penalized out of the  model altogether, as part of smoothing parameter estimation. 2 classes of these shrinkage smoothers are implemented: "cs" and "ts", based on
收缩平滑的身份矩阵小多个,其中一个将被添加平滑的罚款,因此,足够强大的处罚将收缩系数零顺利平滑。可以有效地予以处罚等平滑模型完全平滑参数估计的一部分。实施这些收缩平滑的2类:"cs"和"ts"的基础上,




Null space penalization An alternative is to construct an extra penalty for each  smooth which penalizes the space of functions of zero wiggliness according to its existing penalties. If all the smoothing parameters for such a term tend to infinity then the term is penalized to zero,  and is effectively dropped from the model. The advantage of this approach is that it can be  implemented automatically for any smooth. The select argument to gam causes
空空间处罚另一种方法是构造一个每个平稳惩罚功能零wiggliness的,根据其现有的处罚空间的额外罚款。如果对于这样一个长期的平滑参数往往到无穷大,那么长期被处罚为零,并有效地从模型下降。这种方法的优点是,它可以自动实施任何平稳。 select参数gam导致

REML and ML smoothness selection are equivalent under this approach, and simulation evidence suggests  that they tend to perform a little better than prediction error criteria, for model selection.
REML法和ML平滑的选择是相等的,根据这一办法,模拟证据表明,他们往往执行模式的选择,比预测误差标准更好一点。


作者(S)----------Author(s)----------


Simon N. Wood <a href="mailto:simon.wood@r-project.org">simon.wood@r-project.org</a>



参见----------See Also----------

gam.selection
gam.selection


举例----------Examples----------


## an example of GCV based model selection as[#一个例子GCV的基于模型选择]
## an alternative to stepwise selection, using[#替代逐步选择,使用]
## shrinkage smoothers...[#收缩平滑...]
library(mgcv)
set.seed(0);n <- 400
dat <- gamSim(1,n=n,scale=2)
dat$x4 <- runif(n, 0, 1)
dat$x5 <- runif(n, 0, 1)
attach(dat)
## Note the increased gamma parameter below to favour[#注意:下面增加伽玛参数青睐]
## slightly smoother models...[#稍微平滑的模型...]
b<-gam(y~s(x0,bs="ts")+s(x1,bs="ts")+s(x2,bs="ts")+
   s(x3,bs="ts")+s(x4,bs="ts")+s(x5,bs="ts"),gamma=1.4)
summary(b)
plot(b,pages=1)

## Same again using REML/ML[#再次使用REML法/ ML]
b<-gam(y~s(x0,bs="ts")+s(x1,bs="ts")+s(x2,bs="ts")+
   s(x3,bs="ts")+s(x4,bs="ts")+s(x5,bs="ts"),method="REML")
summary(b)
plot(b,pages=1)

## And once more, but using the null space penalization[#一次,但使用空空间处罚]
b<-gam(y~s(x0,bs="cr")+s(x1,bs="cr")+s(x2,bs="cr")+
   s(x3,bs="cr")+s(x4,bs="cr")+s(x5,bs="cr"),
   method="REML",select=TRUE)
summary(b)
plot(b,pages=1)


detach(dat);rm(dat)

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

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

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-1-24 05:11 , Processed in 0.025708 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表