summary.comparisons: Summarize a comparisons object
Description
Summarize a comparisons object
Usage
# S3 method for comparisons
summary(object, conf_level = 0.95, by = NULL, transform_post = NULL, ...)
Arguments
object
An object produced by the comparisons function
conf_level
numeric value between 0 and 1. Confidence level to use to build a confidence interval.
by
Character vector of variable names over which to compute group-averaged contrasts.
transform_post
(experimental) A function applied to the estimate and confidence interval just before returning the final results. For example, users can exponentiate their final results by setting transform_post=exp or transform contrasts made on the link scale for ease of interpretation.
...
Additional arguments are passed to the predict() method
supplied by the modeling package.These arguments are particularly useful
for mixed-effects or bayesian models (see the online vignettes on the
marginaleffects website). Available arguments can vary from model to
model, depending on the range of supported arguments by each modeling
package. See the "Model-Specific Arguments" section of the
?marginaleffects documentation for a non-exhaustive list of available
arguments.
Value
Data frame of summary statistics for an object produced by the
comparisons function
# NOT RUN {mod <- lm(mpg ~ hp * wt + factor(gear), data = mtcars)
con <- comparisons(mod)
# average marginal effectssummary(con)
# average marginal effects by groupsummary(con, by = "gear")
# }