Lisa,

Please look at some of the demos in the HH package.
These are built on the capabilities of the glht function in the multcomp
package.

## install.packages("HH")  ## if necessary
library(HH)

demo("MMC.WoodEnergy-aov", package="HH") ## first
demo("MMC.WoodEnergy", package="HH")  ## second

Rich
On Wed, Apr 27, 2011 at 5:02 AM, <elgoran@web.de> wrote:

>
>   Dear list,
>   im facing an issue of statistical data analysis that I consider myself
>   unable to resolve in R so i hope to get some valuable insights from you.
> i
>   run an ANOVA with four factors; factor4 is an between factor (two
> different
>   groups measured), the others are withins (tested across /all/ subjects).
>   accordingly, my model looks as follows:
>   fm1
>
> <-aov(dataSubjects~(factor1*factor2*factor3*factor4)+Error(subject/(factor1*
>   factor2*factor3))+factor4,data=mydata)
>   print(summary(fm1))
>   so  far so good. i now would like to perform multiple comparisons, but
>   separately for each level of factor4 (two). this is how I do it: i sort
> out
>   (using subset) the levels im interested in comparing, say level 1 of
> factor
>   1
>   Type.lvl1 <- subset(mydata, factor1 == "lvl1")
>   and then compute an uncorrected pairwise t-test between the two levels of
>   factor 4:
>
> Type.lvl1.P<-pairwise.t.test(Type.lvl1$dataSubjects,Type.lvl1$factor4,p.adj
>   = "none")
>   i do this for every comparison im interested in and apply any method for
>   multiple comparison correction afterwards on the entire set of p values
>   obtained. is this valid (in statistical terms)? if not, could anyone
> refer
>   to a better procedure i should use instead?
>   Thanks in advance.
>   Lisa
>
>   WEB.DE <http://web.de/> DSL Doppel-Flat ab 19,99 €/mtl.! Jetzt mit
>   gratis Handy-Flat! [1]http://produkte.web.de/go/DSL_Doppel_Flatrate/2
>
> References
>
>   1. http://produkte.web.de/go/DSL_Doppel_Flatrate/2
> ______________________________________________
> R-help@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<http://www.r-project.org/posting-guide.html>
> and provide commented, minimal, self-contained, reproducible code.
>

	[[alternative HTML version deleted]]

