- object
An object of class emmGrid
- ...
Additional arguments passed to other methods
- method
Character value giving the root name of a contrast method (e.g.
"pairwise"
-- see emmc-functions). Alternatively, a function
of the same form, or a named list
of coefficients (for a contrast or
linear function) that must each conform to the number of results in each
by
group. In a multi-factor situation, the factor levels are
combined and treated like a single factor.
- interaction
Character vector, logical value, or list. If this is specified,
method
is ignored. See the “Interaction contrasts” section
below for details.
- by
Character names of variable(s) to be used for ``by'' groups. The
contrasts or joint tests will be evaluated separately for each combination
of these variables. If object
was created with by groups, those are
used unless overridden. Use by = NULL
to use no by groups at all.
- offset, scale
Numeric vectors of the same length as each by
group.
The scale
values, if supplied, multiply their respective linear estimates, and
any offset
values are added. Scalar values are also allowed.
(These arguments are ignored when interaction
is specified.)
- name
Character name to use to override the default label for contrasts
used in table headings or subsequent contrasts of the returned object.
- options
If non-NULL
, a named list
of arguments to pass
to update.emmGrid
, just after the object is constructed.
- type
Character: prediction type (e.g., "response"
) -- added to
options
- adjust
Character: adjustment method (e.g., "bonferroni"
) --
added to options
- simple
Character vector or list: Specify the factor(s) not in
by
, or a list thereof. See the section below on simple contrasts.
- combine
Logical value that determines what is returned when
simple
is a list. See the section on simple contrasts.
- ratios
Logical value determining how log and logit transforms are
handled. These transformations are exceptional cases in that there is a
valid way to back-transform contrasts: differences of logs are logs of
ratios, and differences of logits are odds ratios. If ratios = TRUE
and summarized with type = "response"
, contrast
results are
back-transformed to ratios whenever we have true contrasts (coefficients
sum to zero). For other transformations, there is no natural way to
back-transform contrasts, so even when summarized with type = "response"
,
contrasts are computed and displayed on the linear-predictor scale. Similarly,
if ratios = FALSE
, log and logit transforms are treated in the same way as
any other transformation.
- parens
character or NULL
. If a character value, the labels for levels
being contrasted are parenthesized if they match the regular expression in
parens[1]
(via grep
). The default is emm_option("parens")
.
Optionally, parens
may contain second and third elements specifying
what to use for left and right parentheses (default "("
and ")"
).
Specify parens = NULL
or parens = "a^"
(which won't match anything)
to disable all parenthesization.
- enhance.levels
character or logical.
If character, the levels of the named factors that are contrasted are enhanced
by appending the name of the factor; e.g., if a factor named "trt"
has
levels A
and codeB, a trt
comparison is labeled trtA - trtB
.
If enhance.levels
is logical, then if TRUE
(the default),
only factors with numeric levels are enhanced; and of
course if FALSE
, no levels are enhanced.
The levels of by
variables are not enhanced, and any
names of factors that don't exist are silently ignored.
To enhance the labels beyond what is done here, change them
directly via levels<-
.
- x
An emmGrid
object
- reverse
Logical value - determines whether to use "pairwise"
(if TRUE
) or "revpairwise"
(if FALSE
).