I'm simulating data (only one level of grouping) and then I fit a (non-linear) mixed model.
mod1 <- nlme(conc~SSmicmen(time, Vm, K),data=groupedData(conc~time|subject,data=sample1),fixed=Vm+K~1,start=c(Vm=5,K=10))
I want to extract the variance-covariance structure of the random effects. Therefore I use VarCorr
and I get:
> VarCorr(mod1)
subject = pdLogChol(list(Vm ~ 1,K ~ 1))
Variance StdDev Corr
Vm 0.10380769 0.3221920 Vm
K 0.04527981 0.2127905 -0.977
Residual 0.54599683 0.7389160
So, after very long research I still don't know whether this output now gives me the covariance matrix of the random effects, or the precision factor.
See the book of Pinheiro and Bates: in their model assumption (page 311) they assume the random effects to be normally distributed with expectation zero and covariance matrix $\psi$.
Furthermore, there is the precision factor such that
$$
\psi^{-1}=1/\sigma^2\cdot\Delta^T\Delta.
$$
So I am really confused now, what VarCorr
is exactly providing, is it $\Delta$, $\psi$ or something else?
Unfortunately none of these possibilities yields a variance-covariance matrix $\psi$ which is similar (not at all!!) to the one I used to simulate the data, but I don't know whether this is a normal thing when dealing with mixed effects models.