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

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

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

                                        Report gam smoothness estimates as variance components
                                         报告的GAM平滑估计方差分量

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

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

GAMs can be viewed as mixed models, where the smoothing parameters are related to variance  components. This routine extracts the estimated variance components associated with each smooth term, and if possible returns confidence intervals on the standard deviation scale.
GAMS可以被看作是混合模型,平滑参数与方差分量。这个例程中提取的估计方差与每个光滑长期关联的组件,如果可能的回报率的标准差规模的置信区间。


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


gam.vcomp(x,rescale=TRUE,conf.lev=.95)



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

参数:x
a fitted model object of class gam as produced by gam().
拟合模型对象的类gam生产gam()。


参数:rescale
the penalty matrices for smooths are rescaled before fitting, for numerical  stability reasons, if TRUE this rescaling is reversed, so that the variance components are on the original scale.
装修前,被重新调整为平滑的刑罚矩阵数值稳定性的原因,如果TRUE重标度被逆转,方差分量,使原来的规模上。


参数:conf.lev
when the smoothing parameters are estimated by REML or ML, then confidence intervals  for the variance components can be obtained from large sample likelihood results. This gives the  confidence level to work at.
REML法或ML时的平滑参数估计,方差分量置信区间可从大样本的可能性结果。这给工作的信心水平。


Details

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

The (pseudo) inverse of the penalty matrix penalizing a term is proportional to the  covariance matrix of the term's coefficients, when these are viewed as random. For single penalty smooths,  it is possible to compute the variance component for the smooth (which multiplies the  inverse penalty matrix to obtain the covariance matrix of the smooth's coefficients). This variance component is given by the scale parameter divided by the smoothing parameter.
(伪)逆的罚款处罚矩阵的一个术语,是长期的系数的协方差矩阵,当这些都为随机查看成正比。对于单处罚平滑,这是可以计算的顺利方差分量(逆罚矩阵相乘以获得光滑的系数的协方差矩阵)。方差分量除以平滑参数的尺度参数。

This routine computes such variance components, for gam models, and associated confidence intervals, if smoothing parameter estimation was likelihood based. Note that variance components are also returned  for tensor product smooths, but that their interpretation is not so straightforward.
常规计算方差分量,gam模型,以及相关的置信区间,如果平滑参数估计的可能性基础。请注意,方差分量也返回张量积平滑,但他们的解释是不那么简单。

The routine is particularly useful for model fitted by gam in which random effects have  been incorporated.
常规是有用的,特别是装有gam随机效应已纳入模型。


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

Either a vector of variance components for each smooth term (as standard deviations), or a matrix. The first column of the  matrix gives standard deviations for each term, while the subsequent columns give lower and upper confidence bounds, on the same scale.
无论是每个平稳长期(标准偏差),或矩阵方差分量的向量。矩阵的第一列给出了每学期的标准偏差,而随后的列给出置信区间上下,在同等规模。

For models in which there are more smoothing parameters than actually estimated (e.g. if some were fixed, or smoothing parameters are linked) then a list is returned. The vc element is as above, the all element is a vector of variance components for all the smoothing parameters (estimated + fixed or replicated).
模型,其中有更多的平滑参数比实际估计(例如,如果有些是固定的,或平滑参数的链接),然后将返回一个列表。 vc元以上,all元素是所有的平滑参数(估计+固定或复制)的方差分量的向量。

The routine prints a table of estimated standard deviations and confidence limits, if these can be  computed, and reports the numerical rank of the covariance matrix.
估计的标准偏差和置信限的日常打印表,如果这些可以计算,报告的协方差矩阵的数值秩。


作者(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
and marginal likelihood estimation of semiparametric generalized linear  models. Journal of the Royal Statistical Society (B) 73(1):3-36

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

smooth.construct.re.smooth.spec
smooth.construct.re.smooth.spec


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


  set.seed(3)

  ## simulate some data, consisting of a smooth truth + random effects[#模拟的一些数据,包括一个平稳的真理+随机效应]

  dat <- gamSim(1,n=400,dist="normal",scale=2)
  a <- factor(sample(1:10,400,replace=TRUE))
  b <- factor(sample(1:7,400,replace=TRUE))
  Xa &lt;- model.matrix(~a-1)    ## random main effects[#随机的主要影响]
  Xb <-  model.matrix(~b-1)
  Xab &lt;- model.matrix(~a:b-1) ## random interaction[#随机互动]
  dat$y <- dat$y + Xa%*%rnorm(10)*.5 +
           Xb%*%rnorm(7)*.3 + Xab%*%rnorm(70)*.7
  dat$a <- a;dat$b <- b

  ## Fit the model using "re" terms, and smoother linkage  [#适合的模式,采用“重”的条款,和顺畅的联动]
  
  mod <- gam(y~s(a,bs="re")+s(b,bs="re")+s(a,b,bs="re")+s(x0,id=1)+s(x1,id=1)+
               s(x2,k=15)+s(x3),data=dat,method="ML")

  gam.vcomp(mod)


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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-1-23 15:09 , Processed in 0.025080 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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