Mixed design ANOVA

The data set

SubjectAngleLatencyGroup
10450Young
14510Young
18630Young
20390Young
24480Young
28540Young
30570Young
34630Young
38660Young
40450Young
44660Young
48720Young
50510Young
54660Young
58630Young
60360Young
64450Young
68450Young
70510Young
74600Young
78720Young
80510Young
84660Young
88780Young
90510Young
94660Young
98660Young
100510Young
104540Young
108660Young
110420Old
114570Old
118690Old
120600Old
124720Old
128810Old
130450Old
134540Old
138690Old
140630Old
144660Old
148780Old
150420Old
154570Old
158780Old
160600Old
164780Old
168870Old
170630Old
174690Old
178870Old
180480Old
184570Old
188720Old
190690Old
194750Old
198900Old
200510Old
204690Old
208810Old

Data plot

Perform ANOVA tests

kable(
  get_anova_table(
          anova_test(data = data, 
                     dv = Latency, 
                     wid = Subject, 
                     within = Angle, 
                     between = Group,
                     effect.size = "pes", 
                     detailed = TRUE)))
EffectDFnDFdSSnSSdFpp<.05pes
(Intercept)118227673603279001249.8090.000*0.986
Group1181325403279007.2760.015*0.288
Angle23643509054420143.9110.000*0.889
Group:Angle23621090544206.9760.003*0.279

Simple Effects Young

kable(
  get_anova_table(
    anova_test(data = young, 
                     dv = Latency, 
                     wid = Subject, 
                     within = Angle, 
                     effect.size = "pes", 
                     detailed = TRUE)))
EffectDFnDFdSSnSSdFpp<.05pes
(Intercept)199712830146070598.4490e+00*0.985
Angle2181449603204040.7192e-07*0.819

Comparisons of Cell Means Young

kable(
  young %>% 
  pairwise_t_test(Latency ~ Angle,
                  paired = TRUE,
                  p.adjust.method = "none"))
.y.group1group2n1n2statisticdfpp.adjp.adj.signif
Latency041010-6.19422591.60e-041.60e-04***
Latency081010-8.15880191.89e-051.89e-05****
Latency481010-3.25395791.00e-021.00e-02**

Simple Effects Old

kable(
  get_anova_table(
    anova_test(data = old, 
                     dv = Latency, 
                     wid = Subject, 
                     within = Angle, 
                     effect.size = "pes", 
                     detailed = TRUE)))
EffectDFnDFdSSnSSdFpp<.05pes
(Intercept)1913187070181830652.7180*0.986
Angle21831122022380125.1550*0.933

Comparisons of Cell Means Old

kable(
  old %>% 
    pairwise_t_test(Latency ~ Angle,
                  paired = TRUE,
                  p.adjust.method = "none"))
.y.group1group2n1n2statisticdfpp.adjp.adj.signif
Latency041010-6.62170599.68e-059.68e-05****
Latency081010-13.89782592.00e-072.00e-07****
Latency481010-11.50000091.10e-061.10e-06****

Simple Effects Angle0

angle0 <- summary(aov(Latency ~ 1 + Group, data = subset(data, Angle=="0")))
kable(angle0[[1]])
DfSum SqMean SqF valuePr(>F)
Group121780217803.1611030.0923101
Residuals181240206890NANA

Simple Effects Angle4

angle4 <- summary(aov(Latency ~ 1 + Group, data = subset(data, Angle=="4")))
kable(angle4[[1]])
DfSum SqMean SqF valuePr(>F)
Group123805238053.3504570.0837955
Residuals181278907105NANA

Simple Effects Angle8

angle8 <- summary(aov(Latency ~ 1 + Group, data = subset(data, Angle=="8")))
kable(angle8[[1]])
DfSum SqMean SqF valuePr(>F)
Group110804510804514.913040.0011428
Residuals181304107245NANA
Previous