gamm(mgcv)
gamm()所属R语言包:mgcv
Generalized Additive Mixed Models
广义添加剂混合模型
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Fits the specified generalized additive mixed model (GAMM) to data, by a call to lme in the normal errors identity link case, or by a call to gammPQL (a modification of glmmPQL from the MASS library) otherwise. In the latter case estimates are only approximately MLEs. The routine is typically slower than gam, and not quite as numerically robust.
适合指定的广义相加混合的模型(GAMM)的数据,通过呼叫lme在正常错误标识连接的情况,或由一个呼叫到gammPQL(glmmPQL的变形MASS库),否则。在后者的情况下,估计仅约为最大似然估计。该例程是典型的慢于gam,并没有想象中数字强劲。
To use lme4 in place of nlme as the underlying fitting engine, see gamm4 from package gamm4.
要使用lme4代替nlme:的基本拟合引擎的,看到gamm4从包装gamm4。
Smooths are specified as in a call to gam as part of the fixed effects model formula, but the wiggly components of the smooth are treated as random effects. The random effects structures and correlation structures availabale for lme are used to specify other random effects and correlations.
平滑处理被指定为在一个呼叫到gam的固定效应模型公式中的一部分,但蠕动的组件的光滑被视为随机效应。随机效应的结构和相关结构availabale lme是用来指定随机效应和相关性。
It is assumed that the random effects and correlation structures are employed primarily to model residual correlation in the data and that the prime interest is in inference about the terms in the fixed effects model formula including the smooths. For this reason the routine calculates a posterior covariance matrix for the coefficients of all the terms in the fixed effects formula, including the smooths.
据推测,主要采用随机效应和相关结构的数据模型残差相关的主要兴趣是在固定效应模型,包括平滑的公式中的条款推理。由于这个原因,常规计算出的系数固定效应公式中的所有条款,包括平滑后的协方差矩阵。
To use this function effectively it helps to be quite familiar with the use of gam and lme.
要使用此功能,有效地帮助使用gam和lme是很熟悉的。
用法----------Usage----------
gamm(formula,random=NULL,correlation=NULL,family=gaussian(),
data=list(),weights=NULL,subset=NULL,na.action,knots=NULL,
control=list(niterEM=0,optimMethod="L-BFGS-B"),
niterPQL=20,verbosePQL=TRUE,method="ML",...)
参数----------Arguments----------
参数:formula
A GAM formula (see also formula.gam and gam.models). This is like the formula for a glm except that smooth terms (s and te) can be added to the right hand side of the formula. Note that ids for smooths and fixed smoothing parameters are not supported.
一个的GAM公式(formula.gam和gam.models“)。这是像公式的glm除了光滑条款(s和te)可以添加到右手边的公式。需要注意的是ids的平滑和固定的平滑参数不支持。
参数:random
The (optional) random effects structure as specified in a call to lme: only the list form is allowed, to facilitate manipulation of the random effects structure within gamm in order to deal with smooth terms. See example below.
(可选的)随机效应的结构中指定一个呼叫到lme:只list形式是允许的,便于操作的随机效应结构内gamm,以便处理与平滑条款。见下面的例子。
参数:correlation
An optional corStruct object (see corClasses) as used to define correlation structures in lme. Any grouping factors in the formula for this object are assumed to be nested within any random effect grouping factors, without the need to make this explicit in the formula (this is slightly different to the behaviour of lme). This is a GEE approach to correlation in the generalized case. See examples below.
一个可选的corStruct对象(见corClasses)用来定义相关结构lme。此对象的公式中的任何分组因素被假定为是嵌套在任何随机效应分组因素,而不需要使这个明确的在式(这是略有不同的行为lme)。这是GEE在广义的情况下的相关性的方法。见下面的例子。
参数:family
A family as used in a call to glm or gam. The default gaussian