I am having trouble getting appropriate random effects output when using the glmer
command in lme4
.
My dataset is a long-form repeated measures observation for 45 subjects. I have some between-subjects factors that I am using to model whether the participants are correct or incorrect on a given trial. I want to include these variables as both random and fixed effects.
Model <- glmer(Correct ~ Block + Intensity + Emotion + (1|Subject)
+ (1 + Block | Subject) + (1 + Intensity|Subject)
+ (1 + Emotion|Subject) data = data, family = binomial("logit"))
Is this the correct way to specify random effects for these variables? It seems to be based on my understanding of how glmer
works but using this code returns the following as a random effects output:
Random effects:
Groups Name Variance Std.Dev. Corr
Subject (Intercept) 6.830e-01 0.826440
Subject.1 (Intercept) 3.913e-01 0.625541
Block 1.680e-05 0.004099 -0.99
Subject.2 (Intercept) 3.780e-01 0.614842
Intensity 1.605e-04 0.012670 -1.00
Subject.3 (Intercept) 3.902e-01 0.624695
Emotion 3.324e+00 1.823087 -0.22
This doesn't seem to be an appropriate input for interpreting the random effect of these varaibles. Am I misunderstanding this output or is there a better way to specify this model?
Thanks in advance for the help!
Subject
and should be indicated with 45 groups in the output (the part that you did not provide). Then you allow for 3 random slopes (Block
,Intensity
,Emotion
) in your grouping factorSubject
indicated asSubject.1
,Subject.2
andSubject.3
. $\endgroup$