mediation::mediate does not support more than two levels per model
Advertisements When I fit a mediation model using mediation::mediate, like this: library(mediation) set.seed(30) df <- data.frame(x = runif(100), x2 = runif(100), y = runif(100), m = runif(100), p_id = sample(1:5, 100, replace = TRUE), item = sample(LETTERS, 100, replace = TRUE)) fit.totaleffect <- lmer(y ~ (1|item) + (1|p_id) + x + x2, data = df)… Read More mediation::mediate does not support more than two levels per model