Plot information of glht, summary.glht or confint.glht
objects stored as cld objects together with a compact
letter display of all pair-wise comparisons.
Usage
## S3 method for class 'cld'
plot(x, type = c("response", "lp"), ...)
Arguments
x
An object of class cld.
type
Should the response or the linear predictor (lp) be plotted.
If there are any covariates, the lp is automatically used. To
use the response variable, set type="response" and covar=FALSE
of the cld object.
...
Other optional print parameters which are passed to the plotting functions.
Details
This function plots the information stored in glht, summary.glht or
confint.glht objects. Prior to plotting, these objects have to be converted to
cld objects (see cld for details).
All types of plots include a compact letter display (cld) of all pair-wise comparisons.
Equal letters indicate no significant differences. Two levels are significantly
different, in case they do not have any letters in common.
If the fitted model contains any covariates, a boxplot of the linear predictor is
generated with the cld within the upper margin. Otherwise, three different types
of plots are used depending on the class of variable y of the cld object.
In case of class(y) == "numeric", a boxplot is generated using the response variable,
classified according to the levels of the variable used for the Tukey contrast
matrix. Is class(y) == "factor", a mosaic plot is generated, and the cld is printed
above. In case of class(y) == "Surv", a plot of fitted survival functions is generated
where the cld is plotted within the legend.
The compact letter display is computed using the algorithm of Piepho (2004).
Note: The user has to provide a sufficiently large upper margin which can be used to
depict the compact letter display (see examples).
References
Hans-Peter Piepho (2004), An Algorithm for a Letter-Based Representation of All-Pairwise Comparisons,
Journal of Computational and Graphical Statistics, 13(2), 456–466.