[R] lme - Confidence interval for predicted values
wiedemann at fmp-berlin.de
Tue Apr 27 08:43:53 CEST 2004
After having fit (using lme) a mixed effects model with a single
random effect, I like to estimate the confidence interval for the
predicted mean expectations.
To my knowledge this is usually done (for fixed effects models) by
cibandwidth <- sqrt(diag(Xnew %*% solve(t(X) %*% X) t(Xnew))) *
The CI is then the predicted value +/- cibandwidth. This is what
predict.lm provides with ci.fit if I am not wrong.
So for lme there is a very nice post on the S-news list:
Hopefully I quote the message correctly:
>var(y.hat) = X2 %*% inverse(t(X)%*%inverse(Sig)%*%X) %*% t(X2)
>The hard part for lme is deciding what goes in X and what is Sig:
>If you want a confidence interval on y for a particular subject
>included in X, then that subject is part of X; otherwise,
>it must be included in Sig.
My question is now where to obtain "Sig" from lme. Probably this is
obvious and I simply overlooked it.
Thus, I would be very grateful if anyone could help me in this matter.
Forschungsinstitut fuer Molekulare Pharmakologie (FMP)
Abteilung NMR-unterstuetzte Strukturforschung
Tel. +49 (30) 94 793-278
Fax +49 (30) 94 793-169
email wiedemann at fmp-berlin.de
More information about the R-help