# Factorial ANOVA, How to do a imple effects analysis in R?

#### ricardo.l

##### New Member
I am running a factorial ANOVA in R. I want to find out the effect of gender and the semester the student is enrolled in on a standardized test.

It is a factorial ANOVA design with two independent variables: gender (M,F) and semester when the student takes the test (1:12). The dependent variable is the final score in test (scale 0-200)
Groups are unbalanced. (see picture of design attached)

I run a factorial ANOVA in R. It shows a significant interaction between semester and gender.

> summary(h1aov)
Df Sum Sq Mean Sq F value Pr(>F)
semestre 11 289754 26341 125.12 < 2e-16 ***
genero 1 14321 14321 68.02 < 2e-16 ***
semestre:genero 11 11650 1059 5.03 6.79e-08 ***
Residuals 65532 13796821 211
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
563 observations deleted due to missingness

semestre*genero effect
genero
semestre F M
01 94.88933 95.91810
02 99.28315 99.18851
03 98.43196 99.31530
04 98.35030 98.39760
05 101.50248 102.71381
06 101.55119 103.20558
07 103.43888 105.18968
08 102.05529 107.12903
09 102.81137 103.74775
10 101.20833 102.22162
11 92.08696 93.79245
12 94.08583 96.40072

I would like to followup with simple effects analysis but not sure how to plan the comparisons. I have found a couple of examples, but they assume the number of observation in each combination (M_01, M_02...F_ 01, F _02 etc should be similar.

How can I plan and run simple effects in R with this type of design?