[R] "effects" package with "lme4"

Axel Urbiz @xe|@urb|z @end|ng |rom gm@||@com
Fri May 15 23:32:51 CEST 2020


Hello John and others,

I’d appreciate your help as I’m trying to plot the effect of predictor “Days” on Reaction by Subject. I’m only getting one plot in the example below. 

### Start example

library(lme4)
library(splines)
data("sleepstudy")

fm1 <- lmer(Reaction ~ ns(Days, 3) + (ns(Days, 3) | Subject), sleepstudy)
coef(fm1)
plot(allEffects(fm1))

### End example

Thanks,
Axel. 


More information about the R-help mailing list