[R] Posthoc tests for 3-way ANOVA analysis

A Ezhil ezhil02 at yahoo.com
Tue Oct 24 14:43:39 CEST 2006


Hi Torsten,

Thanks for your help. I have downloaded the 'multcomp'
package (windows ver. 0.4-8, but the source is
0.991-1). When I tried with 'glht' function, it says
'object not found'. Am I missing anything?

Thanks again for your help.

Regards,
Ezhil

--- Torsten Hothorn
<Torsten.Hothorn at rzmail.uni-erlangen.de> wrote:

> 
> On Tue, 24 Oct 2006, A Ezhil wrote:
> 
> > Hi All,
> >
> > I have performed a 3-way ANOVA analysis for my
> > experimental data using aov function. My simple R
> > funtion for this is:
> >
> > 3aof <- function(x){
> > m <- data.frame(R,S,T, x);
> > anova(aov(x ~ R+S+T+R*S+R*T+S*T+R*S*T, m) )
> > }
> >
> 
> you can use
> 
> R> library("multcomp") ### check for version 0.991-1
> 
> for some model
> 
> R> amod <- aov(x ~ R+S+T+R*S+R*T+S*T+R*S*T, m)
> 
> with, say, all-pair comparisons of the levels of
> `T':
> 
> R> posth <- glht(amod, linfct = mcp(T = "Tukey"))
> 
> various adjusted p-values can be computed using
> 
> R> summary(posth)
> 
> and confidence intervals (adjusted and unadjusted)
> are available from
> 
> R> confint(posth)
> 
> 
> Hope that helps,
> 
> Torsten
> 
> 
> > Now, I am getting P values for all the main and
> > interactions effects. If I want to perform postdoc
> > test on one of my main effects, say T, what method
> I
> > should use (i have unequal sample size)? Is there
> > anyway I can extend my above '3aof' function to do
> > this?
> >
> > I greatly appreciate your help. Thanks in Advance.
> >
> > Regards,
> > Ezhil
> > Ph.D Student
> > School of Biotechnology
> > AU, India.
> >
> > ______________________________________________
> > 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
> > and provide commented, minimal, self-contained,
> reproducible code.
> >
> >
>



More information about the R-help mailing list