Solved – Can you compare regression slopes from a mixed model

I know that we can do a t-test to compare the slopes of 2 independent regressions line using the coefficients and standard error (example is here: https://stat.ethz.ch/pipermail/r-help/2009-April/195079.html)

Does this same approach work for mixed models?

Testing in one model would be done by simply adding an interaction term. A significant interaction term would show the slopes are different.

If you're testing across two models you could get the confidence intervals of each slope in each model. Then, use those to infer whether the slopes are different. With R and the lme4 package, if your model was m then…

confint(m) 

will get you confidence intervals of your slopes (all fixed effects actually). You might want to use a bootstrapped CI in this case. Check help on confint.merMod.

Similar Posts:

Rate this post

Leave a Comment