[R] Type II and III sums of squares with Error in AOV

Jarrett Byrnes redbeard at arrr.net
Wed Nov 9 15:54:29 CET 2005


While my original design was balanced, I lost several replicates due to 
a storm, making the whole thing unbalanced.  Ah, the realities of 
ecology.

So, how does one look at individual strata, and then how would one 
report an aggregate test of the effect in general?

On Nov 9, 2005, at 4:38 AM, Peter Dalgaard wrote:

> Prof Brian Ripley <ripley at stats.ox.ac.uk> writes:
>
>> A multistratum aov() fit is just a list of aov() fits, so you can 
>> apply
>> functions such as Anova to the individual strata.
>>
>> However, why do you want types II and III sums of squares?  It is 
>> usual
>> to do this type of analysis only with balanced designs.  In the cases 
>> I
>> can envisage that these make any sense, they are the same as type I
>> (and in cases with only one treatment effect, they always are).
>
>
> I was about to make a similar comment. A possible exception is ANCOVA
> where you likely want to test both the within-stratum effect of a
> covariate and the effect of design factors adjusted for the covariate.
>
>
>> On Tue, 8 Nov 2005, Jarrett Byrnes wrote:
>>
>>> I've recently run into the problem of using aov with nested factors,
>>> and wanting to get the type II and III sums of squares.  Normally 
>>> Anova
>>> from the car package would do fine, but it doesn't like having an 
>>> Error
>>> included, so
>>>
>>> my.aov <-aov(Response ~ Treatment + Error(Treatment:Replicate))
>>> Anova(my.aov, type="II")
>>>
>>> yields
>>>
>>> Error in Anova(nested.anova) : no applicable method for "Anova"
>>>
>>> And lm does not take Error as an argument.
>>
>> Nor does log()!  Is that relevant?
>>
>>> Error in eval(expr, envir, enclos) : couldn't find function "Error"
>>>
>>> Is there a way to get these additional types of sums of squares when
>>> Error is included in an aov model?
>>
>> Have you read the reference on the aov help page?  That might be a 
>> good
>> step to deepening your understanding of what Error() does.
>>
>> -- 
>> Brian D. Ripley,                  ripley at stats.ox.ac.uk
>> Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
>> University of Oxford,             Tel:  +44 1865 272861 (self)
>> 1 South Parks Road,                     +44 1865 272866 (PA)
>> Oxford OX1 3TG, UK                Fax:  +44 1865 272595
>>
>> ______________________________________________
>> R-help at stat.math.ethz.ch mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide! 
>> http://www.R-project.org/posting-guide.html
>>
>
> -- 
>    O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
>   c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
>  (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 
> 35327918
> ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)                  FAX: (+45) 
> 35327907
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html
>




More information about the R-help mailing list