0
$\begingroup$

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!

$\endgroup$
2
  • $\begingroup$ @Tavrock Does not seem like self-study to me, and typically the OP should be requested to add the tag if it applies. $\endgroup$ Commented Feb 1, 2017 at 4:51
  • $\begingroup$ Looks OK to me. The output matches what you specified. However, I cannot comment on whether what you specified is reasonable or not since I cannot find a reproducible example. The grouping factor is 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 factor Subject indicated as Subject.1,Subject.2 and Subject.3. $\endgroup$
    – Stefan
    Commented Feb 1, 2017 at 5:29

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.