On May 20, 2012, at 00:58 , 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”)
> 
> 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? 

Please at least provide some output to show the difference (both systems). It's 
pretty hard to guess what might have gone wrong based on partial code for one 
system and no data...

(There are good reasons that base R doesn't do Type III SS. In my experience, 
they are either identical to Type I or test a hypothesis much more bizarre than 
the user expects.)


> Thank you very much!
>       [[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd....@cbs.dk  Priv: pda...@gmail.com

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to