Extract and display information on all pairwise comparisons of estimated marginal means.
CLD(object, ...)# S3 method for emmGrid
CLD(object, details = FALSE, sort = TRUE, by,
alpha = 0.05, Letters = c("1234567890", LETTERS, letters),
reversed = FALSE, ...)
cld.emmGrid(object, ...)
An object of class emmGrid
Arguments passed to contrast
(for example,
an adjust
method)
This function uses the Piepho (2004) algorithm (as implemented in the
multcompView package) to generate a compact letter display of all
pairwise comparisons of estimated marginal means. The function obtains (possibly
adjusted) P values for all pairwise comparisons of means, using the
contrast
function with method = "pairwise"
. When a P
value exceeds alpha
, then the two means have at least one letter in
common.
Logical value determining whether detailed information on tests of pairwise comparisons is displayed
Logical value determining whether the EMMs are sorted before the comparisons
are produced. When TRUE
, the results are displayed according to
reversed
.
Character value giving the name or names of variables by which separate
families of comparisons are tested. If NULL, all means are compared.
If missing, the object's by.vars
setting, if any, is used.
Numeric value giving the significance level for the comparisons
Character vector of letters to use in the display. Any strings of length greater than 1 are expanded into individual characters
Logical value (passed to multcompView::multcompLetters
.)
If TRUE
, the order of use of the letters is reversed.
In addition, if both sort
and reversed
are TRUE, the sort
order of results is reversed.
When details == FALSE, an object of class summary.ref_grid
(which inherits from data.frame
) showing the summary of EMMs with
an added column named .groups
containing the CLD
information.
When details == TRUE
, a list
with the object just described,
as well as the summary of the contrast results showing each comparison,
its estimate, standard error, t ratio, and adjusted P value.
The CLD
function and methods are deprecated.
Compact-letter displays (CLDs) encourage a misleading
interpretation of significance testing by visually grouping means whose comparisons
have P > alpha
as though they are equal. However, failing to
prove two means are different does not prove that they are the same.
In addition, CLDs make
a hard distinction between P values nearly equal to alpha
but on opposite sides.
Some users may find pwpp
to be a useful alternative. It produces a
plot showing all P values for all pairwise comparisons (or other set of comparisons),
and can also show one-sided P values and tests of equivalence or noninferiority.
Also, if you insist, cld
is still available in the
multcomp package, and multcomp::cld(emm)
still works.
Piepho, Hans-Peter (2004) An algorithm for a letter-based representation of all pairwise comparisons, Journal of Computational and Graphical Statistics, 13(2), 456-466.
cld
in the multcomp package, for which a courtesy
method is provided for emmGrid
objects.