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

R语言:smooth.construct.re.smooth.spec()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-2-17 10:19:39 | 显示全部楼层 |阅读模式
smooth.construct.re.smooth.spec(mgcv)
smooth.construct.re.smooth.spec()所属R语言包:mgcv

                                        Simple random effects in GAMs
                                         GAMS简单随机效应

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

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

gam can deal with simple independent random effects, by exploiting the link  between smooths and random effects to treat random effects as smooths. s(x,bs="re") implements  this. Such terms can can have any number of predictors, which can be any mixture of numeric or factor  variables. The terms produce a parametric interaction of the predictors, and penalize the corresponding  coefficients with a multiple of the identity matrix, corresponding to an assumption of i.i.d. normality. See details.
gam可以处理简单的独立的随机效应,利用环节之间的平滑和随机效应治疗随机效应平滑。 s(x,bs="re")实现这个。这些条款可以有任意数量的预测,它可以是任何数字或因素变量的混合物。条款产生的预测参数的相互作用,并惩罚有多重的身份矩阵,相应的IID假设相应的系数常态。查看详情。


用法----------Usage----------


## S3 method for class 're.smooth.spec'
smooth.construct(object, data, knots)
## S3 method for class 'random.effect'
Predict.matrix(object, data)



参数----------Arguments----------

参数:object
For the smooth.construct method a smooth specification object,  usually generated by a term s(x,...,bs="re",). For the predict.Matrix method  an object of class "random.effect" produced by the smooth.construct method.
顺利的规范对象为smooth.construct方法,通常由一个术语s(x,...,bs="re",)。类对象为predict.Matrix方法"random.effect"生产smooth.construct方法。


参数:data
a list containing just the data (including any by variable) required by this term,  with names corresponding to object$term (and object$by). The by variable  is the last element.  
一个列表,其中包含的数据(包括任何by变)这个词所要求的名称object$term,(object$by)。 by变量是最后一个元素。


参数:knots
generically a list containing any knots supplied for basis setup — unused at present.
通用列表包含设置的基础上提供的任何节 - 目前未使用。


Details

详情----------Details----------

Exactly how the random effects are implemented is best seen by example. Consider the model  term s(x,z,bs="re"). This will result in the model matrix component corresponding to ~x:z-1  being added to the model matrix for the whole model. The coefficients associated with the model matrix  component are assumed i.i.d. normal, with unknown variance (to be estimated). This assumption is  equivalent to an identity penalty matrix (i.e. a ridge penalty) on the coefficients. Because such a  penalty is full rank, random effects terms do not require centering constraints.
究竟是如何实现的随机效应是最好的例子。考虑模型长远s(x,z,bs="re")。这将导致相应的模型矩阵组件~x:z-1添加整个模型的模型矩阵。独立同分布的假设与模型基质成分的相关系数正常的,未知方差(估计)。这个假设是相当于身份刑罚矩阵系数(即脊罚款)。因为这种惩罚是满秩的,按随机效应不需要围绕制约。

If the nature of the random effect specification is not clear, consider a couple more examples:  s(x,bs="re") results in model.matrix(~x-1) being appended to the overall model matrix,  while  s(x,v,w,bs="re") would result in  model.matrix(~x:v:w-1) being appended to the model  matrix. In both cases the corresponding model coefficients are assumed i.i.d. normal, and are hence  subject to ridge penalties.
如果随机效应规范的性质不明确,考虑一对夫妇更多的例子:s(x,bs="re")model.matrix(~x-1)被追加到整体模型矩阵,而s(x,v,w,bs="re")会导致<X >被追加到模型矩阵。在这两种情况下,独立同分布的假设相应的模型系数正常,因此受脊处罚。

Note that smooth ids are not supported for random effect terms, and that "re" terms are not suitable for use as marginal smooths in a tensor product smooth.
需要注意的是顺利的idS是不支持随机效应方面,"re"条款不适合用在张的产品顺利的边际平滑。

Random effects implemented in this way do not exploit the sparse structure of many random effects, and  may therefore be relatively inefficient for models with large numbers of random effects, when gamm4 or gamm may be better alternatives. Note also that gam will not support  models with more coefficients than data.
以这种方式实现的随机效应不利用许多随机效应的稀疏结构,因此可能有大量的随机效应模型相对低效,当gamm4或gamm可能是更好的选择。还要注意gam不会支持与系数比数据更模型。


值----------Value----------

An object of class "random.effect" or a matrix mapping the coefficients of the random effect to the random effects themselves.
"random.effect"或映射的随机效应,随机效应本身的系数矩阵类的对象。


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


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



参考文献----------References----------

selection for generalized additive models. Journal of the Royal Statistical Society (B) 70(3):495-518

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

gam.vcomp, gamm
gam.vcomp,gamm


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


## see ?gam.vcomp[#看到了什么?gam.vcomp]

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-1-23 02:07 , Processed in 0.030164 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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