Hi everyone, I'm trying to fit a generalized linear mixed effects model (logistic) in R and am having some trouble specifying the covariance structure for the random effects. I'm using glmer, which by default assumes an unstructured relationship between the random effects, but I want the structure to be a multiple of an identity. Here is my code: glmer(y ~ 1 + (x1 + x2 + x3 + x4 -1 | group_id), family=binomial, ...) where x1-x4 are the columns of my design matrix for the random effects. group_id is the clustering variable. The code above returns separate variances for the random effects associated with x1-x4, as well as the correlation between them. What I really want is the random effects to all have the same variance (i.e. multiple of an identity). It doesn't seem that you can use the pdMat classes, like with lme. Can glmer do what I need it to do, or is there another command that I should be using? Any guidance would be great. Cheers, Kris Kris Jamsen Research Fellow Centre for Molecular, Environmental, Genetic and Analytic (MEGA) Epidemiology Level 1, 723 Swanston St The University of Melbourne Victoria, 3010 AUSTRALIA Email: kmjamsen@unimelb.edu.au <mailto:kmjamsen@unimelb.edu.au> Ph: +61 (0)3 8344 0700 Fax: +61 (0)3 9349 5815 [[alternative HTML version deleted]]
Hi everyone, I sent this message before I became a member of the list, so apologies if you get it twice. Cheers, Kris I'm trying to fit a generalized linear mixed effects model (logistic) in R and am having some trouble specifying the covariance structure for the random effects. I'm using glmer, which by default assumes an unstructured relationship between the random effects, but I want the structure to be a multiple of an identity. Here is my code: glmer(y ~ 1 + (x1 + x2 + x3 + x4 -1 | group_id), family=binomial, ...) where x1-x4 are the columns of my design matrix for the random effects. group_id is the clustering variable. The code above returns separate variances for the random effects associated with x1-x4, as well as the correlation between them. What I really want is the random effects to all have the same variance (i.e. multiple of an identity). It doesn't seem that you can use the pdMat classes, like with lme. Can glmer do what I need it to do, or is there another command that I should be using? Any guidance would be great. Cheers, Kris Kris Jamsen Research Fellow Centre for Molecular, Environmental, Genetic and Analytic (MEGA) Epidemiology Level 1, 723 Swanston St The University of Melbourne Victoria, 3010 AUSTRALIA Email: kmjamsen@unimelb.edu.au <mailto:kmjamsen@unimelb.edu.au> Ph: +61 (0)3 8344 0700 Fax: +61 (0)3 9349 5815 [[alternative HTML version deleted]]
Apparently Analagous Threads
- using glmer to fit a mixed-effects model with gamma-distributed response variable
- Error running MuMIn dredge function using glmer models
- Help with glmer {lme4) function: how to return F or t statistics instead of z statistics.
- Problem on glmer
- lme4 install trouble