[R] ANCOVA with defined error terms

hpdutra hpdutra at yahoo.com
Thu Aug 20 14:39:44 CEST 2009


Thanks Richard,

I tried running the analysis the way you suggested but here is the error
that I get

> track.aov <- aov(mice ~ coon+block*veget*fruit*time -
> block:veget:fruit:time
+                 + Error(block/plot), data = track)
Warning message:
In aov(kotz.mice ~ kotz.coon + block * veget * fruit * time -
block:veget:fruit:time +  :
  Error() model is singular

> anova(track.aov)
Error in UseMethod("anova") : no applicable method for "anova"

I'm not sure you can use the function anova for an aov object. I tried
summary and it also didn't work. Did you mean something else?
Thanks






Richard M. Heiberger wrote:
> 
> track.aov <- aov(mice ~ coon
>                   + block*veget*fruit*time - block:veget:fruit:time
>                   + Error(block/plot), data = track)
> anova(track.aov)
> 
> 
> I think this is what you are looking for.  This model in words says,
> What is the effect of the four-way crossing after adjusting for
> the covariate coon?  We don't have enough degrees of freedom for
> the full crossing, so remove the four-way interaction.
> 
> anova() gives the sequential sums of squares of (multi-degree of
> freedom) effects.  Be sure that the five variables (block, veget, fruit,
> time, plot) are factors.  I am assuming time is a factor here.
> 
> ______________________________________________
> R-help at 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.
> 
> 

-- 
View this message in context: http://www.nabble.com/ANCOVA-with-defined-error-terms-tp25055311p25061223.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list