# Repeated measures ANOVA - degrees of freedom

#### camila jones

##### New Member
I'm studying repeated measures ANOVAs, found this example online and can't understand how are the df calculated. What would be the mathematical expression for calculating both df values in this example?

Code:
data(obk.long, package = "afex")

# estimate mixed ANOVA on the full design:
aov_car(value ~ treatment * gender + Error(id/(phase*hour)),
data = obk.long, observed = "gender")

# the three calls return the same ANOVA table:
# Anova Table (Type 3 tests)
#
# Response: value
#                         Effect          df   MSE         F  ges p.value
# 1                    treatment       2, 10 22.81    3.94 + .198    .055
# 2                       gender       1, 10 22.81    3.66 + .115    .085
# 3             treatment:gender       2, 10 22.81      2.86 .179    .104
# 4                        phase 1.60, 15.99  5.02 16.13 *** .151   <.001
# 5              treatment: phase 3.20, 15.99  5.02    4.85 * .097    .013
# 6                 gender: phase 1.60, 15.99  5.02      0.28 .003    .709
# 7       treatment:gender: phase 3.20, 15.99  5.02      0.64 .014    .612
# 8                         hour 1.84, 18.41  3.39 16.69 *** .125   <.001
# 9               treatment:hour 3.68, 18.41  3.39      0.09 .002    .979
# 10                 gender:hour 1.84, 18.41  3.39      0.45 .004    .628
# 11       treatment:gender:hour 3.68, 18.41  3.39      0.62 .011    .641
# 12                  phase:hour 3.60, 35.96  2.67      1.18 .015    .335
# 13        treatment: phase:hour 7.19, 35.96  2.67      0.35 .009    .930
# 14           gender: phase:hour 3.60, 35.96  2.67      0.93 .012    .449
# 15 treatment:gender: phase:hour 7.19, 35.96  2.67      0.74 .019    .646
# ---
# Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘+’ 0.1 ‘ ’ 1