I'm trying to build and initialize a pdLogChol object from a fitted lme model. However, although the pdLogChol is started from the model fit, the VarCorr function gives different values when compared with that of the model fit. I expected to see identical values but that's not the case. Is this a normal behaviour?
library(nlme)
fm2 <- lme(distance ~ 1, data = Orthodont, random = ~ 1|Subject)
coef(fm2$modelStruct$reStruct$Subject, unconstrained = F)
pd <- pdLogChol(coef(fm2$modelStruct$reStruct$Subject, unconstrained = F))
VarCorr(fm2) # this must be equal to
VarCorr(pd) # but it is not. Why?
VarCorr(pd,sigma=sigma(fm2)), I need to usepd <- pdLogChol(coef(fm2$modelStruct$reStruct$Subject, unconstrained = T)). I'm I right? – utobi Nov 26 '18 at 22:30