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?

**Contents**hide

#### Best Answer

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:

- Solved – Testing for statistical differences of quantile regression line slopes
- Solved – Interpretation of ANCOVA interaction term
- Solved – Significant interaction but non-significant simple slopes
- Solved – Significant interaction but non-significant simple slopes
- Solved – Confidence intervals for emmeans estimates after multilevel binary logistic regression