I am fitting a mixed effect model with a random slope on a factor with 6 levels using the function lmer().

lmer(cc_marg ~ mPair + (0 + mPair | ratID), data = dat, REML = FALSE, 
     na.action = na.omit, control = lCtr)

I would like to simplify the variance-covariance matrix of the random effect by specifying that the 6 levels of the factor mPair are uncorrelated. In other words, I would like to specify a diagonal var-cov matrix. How can I do that using lmer()?

I know it would be easier to use lme() from the nlme package, as I would have access to pdClass. However, that package has issues at estimating the denominator DF for random slope models, and therefore, I would prefer to use the lme4 package. Thanks!


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.