Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/68.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
nlme包中的postVar是否有等价物?_R_Lme4_Nlme - Fatal编程技术网

nlme包中的postVar是否有等价物?

nlme包中的postVar是否有等价物?,r,lme4,nlme,R,Lme4,Nlme,我试图用nlme-包来拟合线性混合模型。我需要nlme,因为我想建立一个自相关模型。但是,我确实需要每个个体的条件方差-协方差矩阵,因为在拟合lmer()模型(lme4-package)时,可以通过ranef()的postVar属性获得 nlme-软件包是否提供了等效软件 MWE: require(nlme) 要求(lme4) fm_lme require(nlme) require(lme4) fm_lme <- lme(follicles ~ sin(2*pi*Time) + cos(

我试图用
nlme
-包来拟合线性混合模型。我需要
nlme
,因为我想建立一个自相关模型。但是,我确实需要每个个体的条件方差-协方差矩阵,因为在拟合
lmer()
模型(
lme4
-package)时,可以通过
ranef()的
postVar
属性获得

nlme
-软件包是否提供了等效软件

MWE:

require(nlme)
要求(lme4)
fm_lme
require(nlme)
require(lme4)
fm_lme <- lme(follicles ~ sin(2*pi*Time) + cos(2*pi*Time), data=Ovary,
           correlation = corAR1(form = ~ 1 | Mare))
fm_lmer <- lmer(follicles ~ sin(2*pi*Time) + cos(2*pi*Time), data= Ovary) 


attr(ranef(fm_lmer, condVar=TRUE)[[1]], "postVar") # lmer solution