## This example is from Hsu and Peruggia
## This is the R version
## See ?mmc.mean for S-Plus
if.R(s={},
r={
data(pulmonary)
pulmonary
pulmonary.aov <- aovSufficient(FVC ~ smoker,
data=pulmonary)
summary(pulmonary.aov)
## Not run:
# pulmonary.mmc <- mmc(pulmonary.aov,
# linfct=mcp(smoker="Tukey"),
# df=pulmonary.aov$df.residual,
# vcov.=vcovSufficient)
# mmcplot(pulmonary.mmc, style="both")
#
# ## orthogonal contrasts
# pulm.lmat <- cbind("npnl-mh"=c( 1, 1, 1, 1,-2,-2), ## not.much vs lots
# "n-pnl" =c( 3,-1,-1,-1, 0, 0), ## none vs light
# "p-nl" =c( 0, 2,-1,-1, 0, 0), ## {} arbitrary 2 df
# "n-l" =c( 0, 0, 1,-1, 0, 0), ## {} for 3 types of light
# "m-h" =c( 0, 0, 0, 0, 1,-1)) ## moderate vs heavy
# dimnames(pulm.lmat)[[1]] <- row.names(pulmonary)
# pulm.lmat
#
# pulmonary.mmc <- mmc(pulmonary.aov,
# linfct=mcp(smoker="Tukey"),
# df=pulmonary.aov$df.residual,
# vcov.=vcovSufficient,
# focus.lmat=pulm.lmat)
#
# mmcplot(pulmonary.mmc, style="both", type="lmat")
# ## End(Not run)
})
Run the code above in your browser using DataLab