lm_slopes_compare {EMAtools}R Documentation

Compare the slopes of two lme models

Description

This allows you to compare two lme4 models that have the same fixed predictors but differ in other ways (e.g., from different datasets, different random effects). It will produce a Z score a p-value for each effect.

Usage

lm_slopes_compare(VAR1, VAR2)

Arguments

VAR1

An lme4 object

VAR2

An lme4 object that has the same variables, in the same order as VAR1.

Value

Z-tests comapring slopes.

Examples

## Not run: model1<-lmer(DV~IV1+IV2+IV3+(1|subject),data=DATA_1)
## Not run: model2<-lmer(DV~IV1+IV2+IV3+(1|subject),data=DATA_2)
 ## Not run: lm_slopes_compare(model1,model2)

[Package EMAtools version 0.1.4 Index]