Re: [R] posthoc tests with ANCOVA

From: Richard M. Heiberger <rmh_at_temple.edu>
Date: Thu 11 Jan 2007 - 02:09:48 GMT


## The WoodEnergy example in package HH (available on CRAN) is similar
## to the example you asked about. I have two factors and a
## covariate, and the interaction between the factors and covariate is
## significant. I construct the multiple comparisons of factor Stove
## at each level of factor Wood at a specified value of the covariate.

## open a trellis.device() with history recording on.
## There are many plots and you will need to move among them.

require(HH)

source(paste(file.path(.path.package(package="HH")[1], "scripts"),

             "MMC.WoodEnergy-aov.R", sep="/"))
## This call prints an Error message that you can ignore because
## the relevant call is inside a try() expression.
anova(energy.aov.4) ## source() needs a print() statement, demo() doesn't.

source(paste(file.path(.path.package(package="HH")[1], "scripts"),

             "MMC.WoodEnergy.R", sep="/"))
## The contrast matrix is developed beginning on line 91 of file
## MMC.WoodEnergy.R

## The MMC (mean-mean multiple comparisons) plots are described in R
## with ?MMC. The MMC plots in R use the glht package.

## Both files are commented. Please read the comments.

## Those source() commands in HH_1.17 will be replaced by demo()
## commands in the next version of HH.

##

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

## glht is not currently able to work with aov objects that have the
## Error() function. You will need to respecify your model formula
## using the terms() function. See the maiz.aov example in the ?MMC
## help page.



R-help@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. Received on Thu Jan 11 13:16:29 2007

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 11 Jan 2007 - 03:30:26 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.