HH (version 3.1-35)

plot.mmc.multicomp: MMC (Mean--mean Multiple Comparisons) plot.

Description

MMC (Mean--mean Multiple Comparisons) plot. The plot method documented here is no longer recommended for R; use mmcplot instead. This method is still necessary for S-Plus.

Usage

# S3 method for mmc.multicomp
plot(x,
     xlab="contrast value",
     ylab=none$ylabel,
     focus=none$focus,
     main= main.method.phrase,
     main2=main2.method.phrase,
     main.method.phrase=
       paste("multiple comparisons of means of", ylab),
     main2.method.phrase=paste("simultaneous ",
       100*(1-none$alpha),"% confidence limits, ",
       method, " method", sep="" ),
     ry.mmc=TRUE,
     key.x=par()$usr[1]+ diff(par()$usr[1:2])/20,
     key.y=par()$usr[3]+ diff(par()$usr[3:4])/3,
     method=if (is.null(mca)) lmat$method else mca$method,
     print.lmat=(!is.null(lmat)),
     print.mca=(!is.null(mca) && (!print.lmat)),
     iso.name=TRUE,
     x.offset=0,
     col.mca.signif="red",  col.mca.not.signif="black",
     lty.mca.signif=1,  lty.mca.not.signif=6,
     lwd.mca.signif=1,  lwd.mca.not.signif=1,
     col.lmat.signif="blue", col.lmat.not.signif="black",
     lty.lmat.signif=1, lty.lmat.not.signif=6,
     lwd.lmat.signif=1, lwd.lmat.not.signif=1,
     lty.iso=7, col.iso="darkgray", lwd.iso=1,
     lty.contr0=2, col.contr0="darkgray", lwd.contr0=1,
     decdigits.ybar=2,
     ...
     )

Arguments

x

mmc.multicomp object

xlab

"contrast value". An alternate "" can help unclutter a figure when several MMC plots are displayed together.

ylab

name of response variable

focus

define the factor to compute contrasts of.

main, main2

main and second line of title of plot

main.method.phrase, main2.method.phrase

default expressions for title of plot

ry.mmc

range of values on the y-axis. It is similar to par("ylim"), but not the same as additional calculations are needed to maintain the isomeans grid as a square.

key.x, key.y

location of the key displayed when iso.name=FALSE.

method

method used to construct contrasts and confidence intervals. See the type argument to glht for the list.

print.lmat

logical. If TRUE, then display the user-specified contrasts.

print.mca

logical. If TRUE, then display the pair-wise contrasts.

iso.name

logical. If TRUE, label the isomeans grid with the factor levels. If FALSE, label the isomeans grid with sequential numbers and display a key relating the numbers to the factor levels.

x.offset

amount to move the vertical 0 line to the left or right to reduce overprinting of labels and plotted lines.

col.mca.signif, lty.mca.signif, lwd.mca.signif

color, line type, line width for significant pairwise contrasts.

col.mca.not.signif, lty.mca.not.signif, lwd.mca.not.signif

color, line type, line width for non-significant pairwise contrasts.

col.lmat.signif, lty.lmat.signif, lwd.lmat.signif

color, line type, line width for significant user-specified contrasts.

col.lmat.not.signif, lty.lmat.not.signif, lwd.lmat.not.signif

color, line type, line width for non-significant user-specified contrasts.

lty.iso, col.iso, lwd.iso

color, line type, line width for the isomeans grid.

lty.contr0, col.contr0, lwd.contr0

color, line type, line width for the vertical contrast=0 line.

decdigits.ybar

number of decimal digits in the left-axis labels.

other arguments, currently ignored.

References

Heiberger, Richard M. and Holland, Burt (2004b). Statistical Analysis and Data Display: An Intermediate Course with Examples in S-Plus, R, and SAS. Springer Texts in Statistics. Springer. ISBN 0-387-40270-5.

Heiberger, Richard M. and Holland, Burt (2006). "Mean--mean multiple comparison displays for families of linear contrasts." Journal of Computational and Graphical Statistics, 15:937--955.

Hsu, J. and Peruggia, M. (1994). "Graphical representations of Tukey's multiple comparison method." Journal of Computational and Graphical Statistics, 3:143--161.

See Also

mmc, plotMatchMMC, mmcplot.

Examples

Run this code
# NOT RUN {
data(catalystm)
catalystm1.aov <- aov(concent ~ catalyst, data=catalystm)
summary(catalystm1.aov)

## See ?MMC to see why these contrasts are chosen
catalystm.lmat <- cbind("AB-D" =c( 1, 1, 0,-2),
                        "A-B"  =c( 1,-1, 0, 0),
                        "ABD-C"=c( 1, 1,-3, 1))
dimnames(catalystm.lmat)[[1]] <- levels(catalystm$catalyst)


catalystm.mmc <-
if.R(r={mmc(catalystm1.aov, linfct = mcp(catalyst = "Tukey"),
            focus.lmat=catalystm.lmat)}
    ,s={multicomp.mmc(catalystm1.aov, focus.lmat=catalystm.lmat,
                     plot=FALSE)}
)

# }
# NOT RUN {
## pairwise contrasts, default settings
plot(catalystm.mmc, print.lmat=FALSE)
# }
# NOT RUN {
## Centering, scaling, emphasize significant contrasts.
## Needed in R with 7in x 7in default plot window.
## Not needed in S-Plus with 4x3 aspect ratio of plot window.
plot(catalystm.mmc, x.offset=2.1, ry.mmc=c(50,58), print.lmat=FALSE)

## user-specified contrasts
plot(catalystm.mmc, x.offset=2.1, ry.mmc=c(50,58))

## reduce intensity of isomeans grid, number isomeans grid lines
plot(catalystm.mmc, x.offset=2.1, ry.mmc=c(50,58),
     lty.iso=2, col.iso='darkgray', iso.name=FALSE)

## both pairwise contrasts and user-specified contrasts
plot(catalystm.mmc, x.offset=2.1, ry.mmc=c(50,58), lty.iso=2,
     col.iso='darkgray', print.mca=TRUE)

# }
# NOT RUN {
## newer mmcplot
mmcplot(catalystm.mmc)
mmcplot(catalystm.mmc, type="lmat")
# }

Run the code above in your browser using DataCamp Workspace