我是一个 ez 包新手,我一直在尝试使用 ezMixed 运行混合效应 anova,因为我的重复测量数据不平衡,并且某些重复观察的数据丢失了一些。我的响应变量“计数”是计数数据的平均值,不遵循泊松分布。首先,我不确定我是否使用 ezMixed 正确指定了我的模型。使用 lme(),我的模型看起来像这样:
lmefitmix2 = lme(count ~ MPA*timepointID,random=~1|siteID/timepointID ,na.action=na.omit,data = notolabrusMav2,method="ML")
我的重复测量(在因子内)是嵌套在我的随机因子 siteID 中的 timepointID。我有兴趣测试分组变量“MPA”(效果之间)的主要效果以及重复测量“时间点 ID”的效果以及它们的相互作用。我知道如果我的设计是平衡的,我可以使用 ezAnova 并指定 wid=.siteID 和 within=.timepoint ID,但我不知道如何在 ezMixed 中翻译它。我的尝试如下,但它看起来像 siteID 和 timepointID 交叉:
er = ezMixed(
data = notolabrusmav2
, dv = .(count)
, random = .(siteID,timepointID)
, fixed = .(MPA,timepointID)
, family = 'gaussian'
)
print(er$summary)
我怎样才能解决这个问题?
此外, print(er$summary) 命令给了我以下结果:
er$summary
effect errors warnings bits
1 MPA FALSE FALSE 1.710731
2 timepointID FALSE FALSE 26.514379
3 MPA:timepointID FALSE FALSE -24.895950
所以我理解这里证据强度最大的主要影响是'timepointID',而两者的相互作用显示证据强度很小。
我尝试使用 ezPredict 和 ezPlot2 生成和绘制预测,如下所示:
myFit = er$models$timepointID$unrestricted
myPreds = ezPredict(myFit)
myPlot = ezPlot2(preds=myPreds,x=timepointID)
print(myPlot$plot)
这给了我以下错误消息:
Error in order(boots$iteration) : argument 1 is not a vector
print(myPlot$plot)
Error in print(myPlot$plot) :
error in evaluating the argument 'x' in selecting a method for function 'print': Error: object 'myPlot' not found
我一直在谷歌上搜索它,但我似乎无法找到帮助我修复它的提示......
感谢您的帮助;0