我正在尝试使用interact_plot
包中的interactions
绘制多级模型。
我的数据比较长,participants
是随机因素,Week
是重复测量(4个级别),condition.factor
(2个级别)是固定效果(参与者之间)。
模型是:
model<-lmer(DV ~ Week*condition.factor+(1|participants),data=Output.combined, REML=T)
该图的代码为:
plot <- interact_plot(model, Week, condition.factor, interval=T, robust=T,
y.label="DV",pred.labels = c("week1","week2","week3","week4"),
modx.labels = c("immerse","distanced"))
plot +
theme(legend.title=element_blank()) +
theme_gdocs() +
theme(legend.title=element_blank(),
legend.justification=c(1,0), legend.position=c(1,0))
我收到此错误:
Error: geom_path: If you are using dotted or dashed lines, colour, size and linetype
must be constant over the line.
我不知道这和它有关。我需要指定modx的线条颜色吗?