Я выполняю преобразование выравнивания ранга следующим образом, используя пакет 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 package :
(testInteractions(model, pairwise="Method" ,across="Trialtype",adjust="bonferroni")
Тем не менее, я получаю эту ошибку: Ошибка в term.default (модель): нет терминов компонент или атрибут
Кто-нибудь будет достаточно любезен протянуть мне руку помощи?
Вот мои необработанные данные:
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")