【发布时间】:2021-04-27 22:20:36
【问题描述】:
在下面的情节中,我想知道是否可以将grade 作为 x 轴?
multivariate <- read.csv('https://raw.githubusercontent.com/hkil/m/master/bv.csv')
library(nlme)
library(effects) # for plot
m2 <- lme(var ~ 0 + d_math + d_hyp + d_math:I(grade-2) + d_hyp:I(grade-2),
random = ~ 0 + d_math + d_hyp + d_math:I(grade-2) + d_hyp:I(grade-2) | id, data = multivariate,
na.action = na.omit, weights = varIdent(c(hyp=.3), form = ~1|grp),
control = lmeControl(maxIter = 200, msMaxIter = 200, niterEM = 50,
msMaxEval = 400))
plot(allEffects(m2), multiline = TRUE)
【问题讨论】:
标签: r regression lme4 mixed-models nlme