Constructs a "mmc.multicomp"
object from the sufficient statistics
for a oneway design. The object must be explicitly plotted.
This is the SPlus version. See ?aovSufficient for R
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21  multicomp.mean(group, n, ybar, s, alpha=.05, ## SPlus
ylabel="ylabel", focus.name="focus.factor", plot=FALSE,
lmat, labels=NULL, ...,
df=sum(n)  length(n),
sigmahat=(sum((n1)*s^2) / df)^.5)
multicomp.mmc.mean(group, n, ybar, s, ylabel, focus.name, ## SPlus
lmat,
...,
comparisons="mca",
lmat.rows=seq(length=length(ybar)),
ry,
plot=TRUE,
crit.point,
iso.name=TRUE,
estimate.sign=1,
x.offset=0,
order.contrasts=TRUE,
method="tukey",
df=sum(n)length(n),
sigmahat=(sum((n1)*s^2)/df)^.5)

group 
character vector of levels 
n 
numeric vector of sample sizes 
ybar 
vector of group means 
s 
vector of group standard deviations 
alpha 
Significance levels of test 
ylabel 
name of response variable 
focus.name 
name of factor 
plot 
logical. Should the 
lmat 

labels 

method 
method for critical point calculation. This corresponds
to 
df 
scalar, residual degrees of freedom 
sigmahat 

... 
other arguments 
comparisons 
argument to SPlus 
estimate.sign, order.contrasts, lmat.rows 
See 
ry 
See argument 
crit.point 
See argument 
iso.name, x.offset 
See 
multicomp.mmc.mean
returns a "mmc.multicomp" object.
multicomp.mean
returns a "multicomp" object.
The multiple comparisons calculations in R and SPlus use
completely different functions.
MMC plots in R are constructed by mmc
based on
glht
.
MMC plots in SPlus are constructed by
multicomp.mmc
based on the SPlus
multicomp
.
The MMC plot is the same in both systems. The details of getting the
plot differ.
Richard M. Heiberger <rmh@temple.edu>
Heiberger, Richard M. and Holland, Burt (2004b). Statistical Analysis and Data Display: An Intermediate Course with Examples in SPlus, R, and SAS. Springer Texts in Statistics. Springer. ISBN 0387402705.
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69  ## This example is from Hsu and Peruggia
## This is the SPlus version
## See ?aovSufficient for R
if.R(r={},
s={
data(pulmonary)
pulmonary.aov < aovSufficient(FVC ~ smoker,
data=pulmonary)
summary(pulmonary.aov)
## multicomp object
pulmonary.mca <
multicomp.mean(pulmonary$smoker,
pulmonary$n,
pulmonary$FVC,
pulmonary$s,
ylabel="pulmonary",
focus="smoker")
pulmonary.mca
## lexicographic ordering of contrasts, some positive and some negative
plot(pulmonary.mca)
pulm.lmat < cbind("npnlmh"=c( 1, 1, 1, 1,2,2), ## not.much vs lots
"npnl" =c( 3,1,1,1, 0, 0), ## none vs light
"pnl" =c( 0, 2,1,1, 0, 0), ## {} arbitrary 2 df
"nl" =c( 0, 0, 1,1, 0, 0), ## {} for 3 types of light
"mh" =c( 0, 0, 0, 0, 1,1)) ## moderate vs heavy
dimnames(pulm.lmat)[[1]] < row.names(pulmonary)
pulm.lmat
## mmc.multicomp object
pulmonary.mmc <
multicomp.mmc.mean(pulmonary$smoker,
pulmonary$n,
pulmonary$FVC,
pulmonary$s,
ylabel="pulmonary",
focus="smoker",
lmat=pulm.lmat,
plot=FALSE)
old.omd < par(omd=c(0,.95, 0,1))
## pairwise comparisons
plot(pulmonary.mmc, print.mca=TRUE, print.lmat=FALSE)
## tiebreaker plot, with contrasts ordered to match MMC plot,
## with all contrasts forced positive and with names also reversed,
## and with matched xscale.
plotMatchMMC(pulmonary.mmc$mca)
## orthogonal contrasts
plot(pulmonary.mmc)
## pairwise and orthogonal contrasts on the same plot
plot(pulmonary.mmc, print.mca=TRUE, print.lmat=TRUE)
par(old.omd)
})

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
Please suggest features or report bugs with the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.