I am new to R and statistics both. I am trying to perform 2x2 ANOVA on an excel dataset where the 2 factors are Gender and Athletes and the dependent variable is Anger Expression. When I am calculating ANOVA on the dataset the Gender Sum Sq always shows 1 for some reason, however when I check on http://vassarstats.net it gives different summary which is actually the correct one. Could you please help me with this?
I have tried to change the Gender and Athletes values from M/F & S/NS to 1/2. Also tried to switch the columns in the hope that something might change. I checked on vassarstats.net by entering the same values which gives me the correct answer. Dataset - https://drive.google.com/file/d/15cR4OR1hdso9Xm6fKc5jiFsSDzJK5pOn/view?usp=sharing
Code that I have executed
> Angry_moods_r$Gender <- as.factor(Angry_moods_r$Gender) > Angry_moods_r$Athletes <- as.factor(Angry_moods_r$Athletes) > anova1 <- aov(Anger_Expr ~ Gender+Athletes+Gender*Athletes, data = Angry_moods_r) > summary(anova1) Df Sum Sq Mean Sq F value Pr(>F) Gender 1 1 1.4 0.009 0.92598 Athletes 1 1357 1357.2 8.709 0.00424 ** Gender:Athletes 1 5 5.2 0.034 0.85505 Residuals 74 11532 155.8
Df Sum Sq Mean Sq F value Pr(>F) Gender 1 20.87 20.87 0.13 0.7195 Athletes 1 1286.93 1286.93 8.26 0.0053 ** Gender:Athletes 1 5.24 5.24 0.03 0.863 Residuals 74 11532.19 155.84 Total 77 12896