我正在尝试使用lme和效果包的输出绘制3路交互效果。虽然我已经能够生成图形,但是图形线扩展了x变量的长度,尽管每个z变量只有一个实际x数据的范围,所以我在寻找像ggplot2中看到的fullrange = F这样的选项。似乎没有关于效果或情节的全范围选项,我还没有得到关于如何限制z的每个变量的x轴范围的答案。 关于如何在单个图中绘制我的lme对每个z变量的影响的任何建议仅针对该变量的给定x范围?
lme.vol.itx=lme(CortexVol ~ Actual.Age*SexCoded*TannerStage+ICV, random= ~1 | StudyID, data = data_long_tanner, na.action=na.omit, method="ML")
print(summary(lme.vol.itx))
ep=effect(term="Actual.Age:SexCoded:TannerStage", mod=lme.vol.itx, default.levels=5)
plot(ep, multiline=TRUE, rug=F, x.var="Actual.Age", z.var="TannerStage", colors=c("black", "deepskyblue", "green4", "purple", "red"))
Data
Actual.Age = x variable: range 0 to 6, continuous
5 levels of z variable: range 1:5 in increments of 1
2 levels of SexCoded = 0 boys, 1 girls
Range of Actual.Age by 5 levels of z in boys:
z=1 Ages: 2.07 to 3.24
z=2 Ages: 1.73 to 4.81
z=3 Ages: 2.06 to 6
z=4 Ages: 2.29 to 5.82
z=5 Ages: 3.23 to 6.15
Range of Actual.Age by 5 levels of z in girls:
z=1 Ages: 1 to 1.4
z=2 Ages: 0.14 to 3.9
z=3 Ages: 1.13 to 3.54
z=4 Ages: 1.32 to 5.42
z=5 Ages: 2.27 to 5.91