On Mar 18, 2012, at 08:21 , shoreliner11 wrote:
> I'm still relatively new to R but was wondering if anyone could help me
force
> R to compute the f-statistic etc using the the nested term rather than the
> residual. In my particular case we were nesting a treatment effect by a
> replicated tank which was not non-significant enough (p>0.25)to be
dropped
> from the statistical model.
Ouch!!!!! Don't _ever_ take high p-values as proof of absence of effect.
>
> Here's my code:
> summary(analysis1<-aov(Area~Treatment/Tank))
>
> Area is the response variable, treatment is the main effect, nested within
a
> replicated tank. Thanks so much for your help.
>
I.e. Tanks are numbered within Treatments, so that Treatment 1, Tank 1 is
distinct from Treatment 2, Tank 1?
Something like aov(Area~Treatment + Error(Treatment:Tank)) should do it.
There's a wart in aov() causing this sort of model to throw a warning that
"Error() model is singular", for reasons that I never quite fathomed.
An explicit
TrTa <- interaction(Treatment,Tank)
and then using Error(TrTa) gets rid of the warning and provides equivalent
output.
> --
> View this message in context:
http://r.789695.n4.nabble.com/ANOVA-testing-over-nested-MS-term-tp4481767p4481767.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> 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.
--
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com