lm_slopes_compare: Compare the slopes of two lme models

Description Usage Arguments Value Examples

View source: R/comparelme.R

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

1
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

1
2
3
## 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)

Example output



EMAtools documentation built on Nov. 1, 2021, 1:07 a.m.