sort.by = "height"
matches the order in the MMC plot.
An alternate sort.by = "estimate"
matches the order of the
half-normal plot. Or the argument sort.order
can be used
to specify any other order.multicomp.order(mca, sort.by = "height", sort.order = NULL)multicomp.label.change(x, old="adj", new="new", how.many=2)
## S3 method for class 'multicomp':
multicomp.label.change(x, old="adj", new="new", how.many=2)
## S3 method for class 'mmc.multicomp':
multicomp.label.change(x, old="adj", new="new", how.many=2)
"multicomp"
object. This is the result of
multicomp
in S-Plus or the result from applying as.multicomp
to
a "glht"
object in R."height"
or "estimate"
.sort.order
in non-NULL
, it is used."multicomp"
object."multicomp"
object containing the same
contrasts as the argument. multicomp.order
sorts the contrasts
(and renames them consistently) according to the specifications.
multicomp.label.change
changes the contrast names according to the specifications.
When sort.by=="height"
, sort the contrasts by the reverse order
of the heights. This provides a "multicomp"
object that will be
plotted by plot.multicomp
in the same order used by
plot.mmc.multicomp
. If there is not "height"
component,
the original "multicomp"
object is returned.When sort.by=="estimate"
, sort the contrasts by the reverse order
of the contrast estimates. This provides the same order as the
half-normal plot.
When sort.order
in non-NULL
, sort the contrasts in
that order.
Heiberger, R.~M. and Holland, B. (2006). "Mean--mean multiple comparison displays for families of linear contrasts." Journal of Computational and Graphical Statistics, 15:937--955.
MMC
, as.glht in R
,
multicomp.reverse
## continue with the example in glht.mmc in R, or multicomp.mmc in S-Plus
catalystm <- read.table(hh("datasets/catalystm.dat"), header=FALSE,
col.names=c("catalyst","concent"))
catalystm$catalyst <- factor(catalystm$catalyst, labels=c("A","B","C","D"))
catalystm1.aov <- aov(concent ~ catalyst, data=catalystm)
if.R(r={
catalystm.mca <-
glht(catalystm1.aov, linfct = mcp(catalyst = "Tukey"))
print(confint(catalystm.mca))
catalystm.mmc <-
glht.mmc(catalystm1.aov, linfct = mcp(catalyst = "Tukey"))
## the contrasts have been ordered by height (see ?MMC),
## which in this example corresponds to sort.order=c(1,2,4,3,5,6),
## and reversed, to make the contrast Estimates positive.
print(as.glht(catalystm.mmc$mca))
## ## For consistency with the S-Plus example,
## ## we change all factor level "A" to "control".
## as.glht(multicomp.label.change(catalystm.mmc$mca, "A", "control"))
},s={
catalystm.mca <-
multicomp(catalystm1.aov, method="Tukey")
print(catalystm.mca)
catalystm.mmc <-
multicomp.mmc(catalystm1.aov, method="Tukey", plot=FALSE)
## the contrasts have been ordered by height (see ?MMC),
## which in this example corresponds to sort.order=c(1,2,4,3,5,6),
## and reversed, to make the contrast Estimates positive.
print(catalystm.mmc$mca)
## S-Plus multicomp already uses simple names. This function is
## therefore used in more complex two-way ANOVA examples. We illustrate
## here by changing all factor level "A" to "control".
print(multicomp.label.change(catalystm.mmc$mca, "A", "control"))
})
Run the code above in your browser using DataLab