HI, I am using lmer() for a simple mixed effects model. The model is of the form logit(y)~ x + (1|z), where x is an indicator variable and z a multi-level factor.
I would like an estimate of the response variable (either y or logit y) with an associated confidence interval for a given value of x. There does not appear to be a predict function written for lmer(). The output for the fixed effects gives a standard error for the intercept, the coefficient of x and the correlation. For n observations, I transform the std errors to variances, and with the correlation, I think I can use the formula Var(intercept + x) = Var(intercept) + Var(x) + 2Cov(x,intercept) to get the variance of the fixed effects component of the response variable. However, I would like to include the random effects component of the variance, so I may derive a standard error and confidence interval for the variance. Does anyone know how to do this? Is there a ready made function like predict() or does anyone know how to incorporate the variance of random effects term to derive the std error of the response variable? Regards, Brian [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.