getVarCov(nlme)
getVarCov()所属R语言包:nlme
Extract variance-covariance matrix
提取协方差矩阵
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Extract the variance-covariance matrix from a fitted model, such as a mixed-effects model.
从拟合的模型,如混合效应模型,提取的协方差矩阵。
用法----------Usage----------
getVarCov(obj, ...)
## S3 method for class 'lme'
getVarCov(obj, individuals,
type = c("random.effects", "conditional", "marginal"), ...)
## S3 method for class 'gls'
getVarCov(obj, individual = 1, ...)
参数----------Arguments----------
参数:obj
A fitted model. Methods are available for models fit by lme and by gls
拟合模型。方法是为lmegls,适合机型可用的
参数:individuals
For models fit by lme a vector of levels of the grouping factor can be specified for the conditional or marginal variance-covariance matrices.
对于拟合模型lme分组因子水平的矢量可以指定条件或边际的协方差矩阵。
参数:individual
For models fit by gls the only type of variance-covariance matrix provided is the marginal variance-covariance of the responses by group. The optional argument individual specifies the group of responses.
为拟合模型gls提供的协方差矩阵的唯一类型是按组的协方差边际的答复。可选的参数individual指定组的答复。
参数:type
For models fit by lme the type argument specifies the type of variance-covariance matrix, either "random.effects" for the random-effects variance-covariance (the default), or "conditional" for the conditional. variance-covariance of the responses or "marginal" for the the marginal variance-covariance of the responses.
为模型适合lmetype参数指定的协方差矩阵的类型,要么"random.effects"随机效应的方差 - 协方差(默认),或"conditional"有条件的。的反应或"marginal"边际响应协方差协方差。
参数:...
Optional arguments for some methods, as described above
可选参数的一些方法,如上所述
值----------Value----------
A variance-covariance matrix or a list of variance-covariance matrices.
一个协方差矩阵或协方差矩阵列表。
作者(S)----------Author(s)----------
Mary Lindstrom <a href="mailto:lindstro@biostat.wisc.edu">lindstro@biostat.wisc.edu</a>
参见----------See Also----------
lme, gls
lme,gls
举例----------Examples----------
fm1 <- lme(distance ~ age, data = Orthodont, subset = Sex == "Female")
getVarCov(fm1)
getVarCov(fm1, individual = "F01", type = "marginal")
getVarCov(fm1, type = "conditional")
fm2 <- gls(follicles ~ sin(2*pi*Time) + cos(2*pi*Time), Ovary,
correlation = corAR1(form = ~ 1 | Mare))
getVarCov(fm2)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|