2
$\begingroup$

I am trying to extract the variance-covariance matrix of the residuals of a generalized linear mixed-effects model that was fitted using lmer (of the R package lme4), but this does not seem to be straightforward. Does anybody knows how this can be done?

Thanks,

Regards, Willem

$\endgroup$

closed as off-topic by Peter Flom Dec 14 '13 at 16:28

  • This question does not appear to be about statistics within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ This question appears to be off-topic because it is about how to do something in R. It would be better to ask this on a list devoted to R or lme. $\endgroup$ – Peter Flom Dec 14 '13 at 16:28
1
$\begingroup$

As stated here, we usually do not need to estimate the variance-covariance matrix of the error term (or residuals, in the sense of latent outcome) in generalized linear mixed models:

The variance-covariance matrix of the residuals, $ε$ or the condition covariance matrix of $y|X\beta+Z\gamma$. The most common residual covariance structure is

$$R=I\sigma^2_ε$$ where $I$ is the identity matrix (diagonal matrix of 1s) and $\sigma^2_ε$ is the residual variance. This structure assumes a homogeneous residual variance for all (conditional) observations and that they are (conditionally) independent. Other structures can be assumed such as compound symmetry or autoregressive.

Take binary data for an example, for logit link function, $\sigma^2_ε=\pi^2/3$ as the error comes for standard logistic distribution; for probit link, $\sigma^2_ε=1$ as the error comes from standard normal distribution.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.