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")
4

0 回答 0