0

I have the following lme model (intercepts random on 3 levels):

  • Y=dependent V.,
  • V1-V3=individual level variables (level 1),
  • V4=Country level variable (level 3)

random slope for V1 cross-level interaction of V1 and V4

modelCI1= lme(Y~ V1+V2+V3+V1*V4+V4,
            data=total,
            method="ML",
            na.action="na.omit",
            random=list(~1|level2,~V1|level3),
            control=lmeControl(msMaxIter = 200))

I would like to plot the marginal effects of V1 for each level of V4.

jay.sf
  • 60,139
  • 8
  • 53
  • 110

1 Answers1

0

Try the ggeffects-package. This should work:

library(ggeffects)
p <- ggpredict(nodelCI1, c("V1", "V4"))
plot(p)

Details can be found in the Articles from the above linked website.

Daniel
  • 7,252
  • 6
  • 26
  • 38