The short answer: use drop1().

The long(er) answer: think harder about what question(s) you want answered
(i.e., what hypotheses you really want to test, and test only those).  The
model hierarchy says that a model should not have an interaction term
involving a factor whose main effect is not present in the model.  Seen in
this light, the hypothesis you're trying to test involves a non-sensical
model.

Andy

> -----Original Message-----
> From: Josef Frank [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 06, 2003 6:14 PM
> To: [EMAIL PROTECTED]
> Subject: [R] type III Sum Sq in ANOVA table - Howto?
> 
> 
> Hello,
> 
> as far as I see, R reports type I sums of squares. I'd like 
> to get R to
> print out type III sums of squares. 
> 
> e.g. I have the following model:
> vardep~factor1*factor2
> 
> to get the type III sum of squares for factor1 I've tried
> anova(lm(vardep~factor2+factor1:factor2),lm(vardep~factor1*factor2))
> but that didn't yield the desired result.
> 
> Could anyone give me a hint how to proceed?
> 
> thanks in advance
> Josef
> 
> ______________________________________________
> [EMAIL PROTECTED] mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> 

------------------------------------------------------------------------------

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help

Reply via email to