I have data with two factors TREATMENT and TIME both with two levels and a dependent variable RATIO. Besides random intercept for subjects, I want to specify random slopes for both of the independent variables for the mixed effect model in R using lmer.

Currently I have the model

lmer(RATIO ~ TREATMENT + TIME + (1 + TREATMENT + TIME | SUBJECT), data=my.data)

and the following questions.

  1. Is the above model syntactically correct for specifying different random slopes for treatment and time?
  2. What could be the reason that the model does not converge, i.e. it gives the following warning?

enter image description here

Thanks in advance

  • $\begingroup$ 1) Yes. 2) Insufficient data to support that model or some other properties of your data/experimental design. $\endgroup$
    – Roland
    Feb 23, 2015 at 8:02

1 Answer 1


Strictly speaking the model you present is syntactically correct.

Usually convergence failures are due to model misspecification, or insufficient data for estimation.

We do not know how many data-points you have so that might be an issue. Here you are specifying a model that has correlations between the random slopes for TIME and TREATMENT. You might want to try a model that has no correlations between the slopes but has two intercepts, eg. lmer(RATIO ~ TREATMENT + TIME + (TREATMENT| SUBJECT) + (TIME | SUBJECT), data=my.data) and see if this is adequate for your purposes. (The 1 + are redundant so I omitted them)

  • $\begingroup$ As there are only 5 subjects, the amount of data points in the subset of some time epochs and treatments might be the problem indeed. Your suggestion without correlation works and makes sense. Thanks! $\endgroup$
    – juliuslaak
    Feb 26, 2015 at 9:11
  • $\begingroup$ I am glad I could help. Best of luck with the rest of your analysis! $\endgroup$
    – usεr11852
    Feb 27, 2015 at 2:51

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.