anovas ss typeI vs typeIII
On May 19, 2012, at 6:58 PM, jacaranda tree wrote:
Hi all, I have been struggling with ANOVAs on R. I am new to R, so I created a simple data frame, and I do some analyses on R just to learn R and then check them on SPSS to make sure that I am doing fine. Here is the problem that I've run into: when we use the aov function, it uses SS Type I as default (on SPSS it is Type III). Then I used the Anova function under cars package using the command: mod <- lm(DV ~ IV1*IV2, data = mydata, contrasts=list(IV1=contr.sum, IV2=contr.sum)) Anova(mod, type=?3?)
Are you perhaps having a problem due to using a non-plain-text editor? Those quotes look "wrong". compare " with ? I do not think the second version of double-quote will be recognized correctly.
Above, both of my IVs are between-SS variables. But still, results from this model do not match the results from SPSS (I have to say they are not too different either). But I was wondering if I am doing something wrong. If what I am doing is okay, then my next question is can I use the same set of commands (for Anova function) if one of my IVs was within-SS and the other IV was between-SS? Thank you very much! [[alternative HTML version deleted]]
Part of learning R is moving away from pretty versions of formatting,
David Winsemius, MD West Hartford, CT