使用对齐秩变换测试(非参数双向方差分析)测试交互作用

问题描述 投票:0回答:1

我正在使用 ARTool 包完成对齐排名转换,如下所示:

model = art(Proportioncorrect~Trialtype+Method+Trialtype:Method,data=Cummulativecounting)
I have two factors (independent variables), being Method and Trial type My dependent variable is the proportion of correct trials (Proportioncorrect)

Anova(model)

Analysis of Variance of Aligned Rank Transformed Data

Table Type: Anova Table (Type III tests) 
Model: No Repeated Measures (lm)
Response: art(Proportioncorrect)

                   Df Df.res F value     Pr(>F)    
1 Trialtype         1     26 41.1793 8.4687e-07 ***
2 Method            1     26  8.6554  0.0067722  **
3 Trialtype:Method  1     26  5.3010  0.0295733   *
---
Signif. codes:   0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

我想测试这两个因素之间的相互作用,因此我尝试了以下命令,我知道它正在测试对比之间的对比

testInteractions(artlm(model, "Trialtype:Method"), pairwise=c("Trialtype", "Method"),adjust="bonferroni")

F Test:
P-value adjustment method: bonferroni
                                        Value Df Sum of Sq     F  Pr(>F)
Beaconed-Probe : Counting-Not-counting 17.667  1    374.53 5.301 0.02957 *
Residuals                                     26   1837.00
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ‘ ’ 1
However, I want to compare the results for Trial Type across Method.

因此,我使用 phia 包尝试了下面的公式

(testInteractions(model, pairwise="Method" ,across="Trialtype",adjust="bonferroni")

但是,我收到此错误: terms.default(model) 中的错误:没有术语组件或属性

有人愿意帮助我吗?

这是我的原始数据:

structure(list(ID = c("P_200214123342", "P_200224092247", "P_200219163622", 
"P_200220130332", "P_200219091823", "P_200225184226", "P_200219123120", 
"P_200219175102", "P_200214103155", "P_200219111605", "P_200217101213", 
"P_200219102411", "P_200221101028", "P_200220145557", "P_200225171612", 
"P_200224092247", "P_200219163622", "P_200220130332", "P_200214123342", 
"P_200219091823", "P_200225184226", "P_200219123120", "P_200219175102", 
"P_200214103155", "P_200219111605", "P_200217101213", "P_200219102411", 
"P_200221101028", "P_200220145557", "P_200225171612"), Trialtype = c("Beaconed", 
"Beaconed", "Beaconed", "Beaconed", "Beaconed", "Beaconed", "Beaconed", 
"Beaconed", "Beaconed", "Beaconed", "Beaconed", "Beaconed", "Beaconed", 
"Beaconed", "Beaconed", "Probe", "Probe", "Probe", "Probe", "Probe", 
"Probe", "Probe", "Probe", "Probe", "Probe", "Probe", "Probe", 
"Probe", "Probe", "Probe"), Proportioncorrect = c(66.666667, 
97.333333, 66.666667, 88, 54.666667, 92, 97.333333, 90.666667, 
96, 90.666667, 96, 90.666667, 96, 96, 93.333333, 29.333333, 16, 
14.666667, 6.666667, 8, 16, 13.333333, 21.333333, 16, 26.666667, 
33.333333, 24, 21.333333, 62.666667, 93.333333), Method = c("Counting", 
"Counting", "Counting", "Counting", "Counting", "Counting", "Counting", 
"Not-counting", "Counting", "Counting", "Counting", "Counting", 
"Counting", "Not-counting", "Not-counting", "Counting", "Counting", 
"Counting", "Counting", "Counting", "Counting", "Counting", "Not-counting", 
"Counting", "Counting", "Counting", "Counting", "Counting", "Not-counting", 
"Not-counting")), row.names = c(NA, -30L), class = "data.frame")
r statistics anova interaction posthoc
1个回答
0
投票

我知道这是不久前发布的,但对于其他最终来到这里的人来说;我相信您正在寻找的是 art.con (请在此处查看更多信息: https://cran.r-project.org/web//packages/ARTool/vignettes/art-contrasts.html)。

我不确定你的实验设计是什么,但是,如果你使用 Bonferroni 来调整重复测量,我意识到你的对齐等级变换调用不包含错误项来告诉 ART 你正在使用重复测量措施设计;因此,我在这里假设您不希望重复测量设计,并且对比测试中的 Bonferroni 校正是不必要的。因此,我认为您需要做的就是:

art.con(m,“试验类型:方法”)。

此外,如果您想在对比度测试中包含 Bonferroni 校正,您可以添加 adjustment = "bonf"。

最后,您的帖子提到了对比的对比,如果您仍然想执行该测试,则只需将“interaction = TRUE”添加到您的函数调用中(如下所示:art.con(m, "TrialType:Method",互动=真))

希望这有帮助!

© www.soinside.com 2019 - 2024. All rights reserved.