# as.multicomp

##### Support functions in R for MMC (mean--mean multiple comparisons) plots.

MMC plots: In R, functions used to interface the `glht`

in R to the MMC
functions designed with S-Plus `multicomp`

notation. These are
all internal functions that the user doesn't see.

- Keywords
- dplot

##### Usage

```
## S3 method for class 'mmc.multicomp':
print(x, ...)
## S3 method for class 'multicomp':
print(x, ...)
## print.multicomp.hh(x, digits = 4, ..., height=T) ## S-Plus only
## S3 method for class 'multicomp.hh':
print(x, ...) ## R only
print.glht.mmc.multicomp(x, ...) ## R. yes, spell it out.
as.multicomp(x, ...)
## S3 method for class 'glht':
as.multicomp(x, ## glht object
focus, ## currently required
ylabel=deparse(terms(x$model)[[2]]),
means=model.tables(x$model, type="means",
cterm=focus)$tables[[focus]],
height,
lmat=t(x$linfct),
lmat.rows=lmatRows(x, focus),
lmat.scale.abs2=TRUE,
estimate.sign=1,
order.contrasts=TRUE,
contrasts.none=FALSE,
level=0.95,
calpha=NULL,
method=x$type,
df,
vcov.,
...
)
as.glht(x, ...)
## S3 method for class 'multicomp':
as.glht(x, ...)
```

##### Arguments

- x
`"glht"`

object for`as.multicomp`

. A`"mmc.multicomp"`

object for`print.mmc.multicomp`

and`print.glht.mmc.multicomp`

. A`"multicomp"`

object for`as.glht`

and <- ...
- other arguments.
- focus
- name of focus factor.
- ylabel
- response variable name on the graph.
- means
- means of the response variable on the
`focus`

factor. - lmat, lmat.rows
`mmc`

- lmat.scale.abs2
- logical, almost always
`TRUE`

. If it is not`TRUE`

, then the contrasts will not be properly placed on the MMC plot. - estimate.sign
- numeric. 1: force all contrasts to be positive by
reversing negative contrasts. $-1$: force all contrasts to be negative by
reversing positive contrasts. Leave contrasts as they are constructed
by
`glht`

. - order.contrasts, height
- logical. If
`TRUE`

, order contrasts by`height`

(see`MMC`

). - contrasts.none
- logical. This is an internal detail. The
``contrasts'' for the group means are not real contrasts in the
sense they don't compare anything.
`glht.mmc.glht`

sets this argument to`TRUE`

for the`none`

comp - level
- Confidence level. Defaults to 0.95.
- calpha
- User-specified critical point.
See
`confint.glht.hh`

and`confint.glht`

. - df, vcov.
- Arguments forwarded through
`glht`

to`modelparm`

. - method
- See
`type`

in`confint.glht`

.

##### Details

The `mmc.multicomp`

`print`

method displays the confidence intervals and heights on the
MMC plot for each component of the `mmc.multicomp`

object.
`print.multicomp`

displays the confidence intervals and heights for
a single component.
`print.glht.mmc.multicomp(x, ...)`

uses `print.glht`

on each
component of a `mmc.multicomp`

object and therefore prints only
the estimates of the comparisons.

##### Value

`as.multicomp`

is a generic function to change its argument to a`"multicomp"`

object.`as.multicomp.glht`

changes an`"glht"`

object to a`"multicomp"`

object. If the model component of the argument`"x"`

is an`"aov"`

object then the standard error is taken from the`anova(x$model)`

table, otherwise from the`summary(x)`

. With a large number of levels for the focus factor, the`summary(x)`

function is exceedingly slow (80 minutes for 30 levels on 1.5GHz Windows XP). For the same example, the`anova(x$model)`

takes a fraction of a second.

##### Note

The multiple comparisons calculations in R and S-Plus use
completely different libraries.
MMC plots in R are based on `glht`

.
MMC plots in S-Plus are based on `multicomp`

.
The MMC plot is the same in both systems. The details of gettting the
plot differ.

##### 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, 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.

##### See Also

*Documentation reproduced from package HH, version 2.1-29, License: GPL (>= 2)*