pwpm | R Documentation |
This function presents results from emmeans
and pairwise comparisons
thereof in a compact way. It displays a matrix (or matrices) of estimates,
pairwise differences, and P values. The user may opt to exclude any of these
via arguments means
, diffs
, and pvals
, respectively.
To control the direction of the pairwise differences, use reverse
;
and to control what appears in the upper and lower triangle(s), use flip
.
Optional arguments are passed to contrast.emmGrid
and/or
summary.emmGrid
, making it possible to control what estimates
and tests are displayed.
pwpm(emm, by, reverse = FALSE, pvals = TRUE, means = TRUE,
diffs = TRUE, flip = FALSE, digits, ...)
emm |
An |
by |
Character vector of variable(s) in the grid to condition on. These
will create different matrices, one for each level or level-combination.
If missing, |
reverse |
Logical value passed to |
pvals |
Logical value. If |
means |
Logical value. If |
diffs |
Logical value. If |
flip |
Logical value that determines where P values and differences
are placed. |
digits |
Integer. Number of digits to display. If missing, an optimal number of digits is determined. |
... |
Additional arguments passed to |
A matrix or 'list' of matrices, one for each 'by' level.
If emm
is the result of a Bayesian analysis, pwpm
is
based on a frequentist analysis
A graphical display of essentially the same results is available
from pwpp
warp.lm <- lm(breaks ~ wool * tension, data = warpbreaks)
warp.emm <- emmeans(warp.lm, ~ tension | wool)
pwpm(warp.emm)
# use dot options to specify noninferiority tests
pwpm(warp.emm, by = NULL, side = ">", delta = 5, adjust = "none")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.