`modelsummary_wide` is a specialized function to display groups of parameters from a single model in separate columns. This can be useful, for example, to display the different levels of coefficients in a multinomial regression model (e.g., `nnet::multinom`). The `coef_group` argument specifies the name of the group identifier.
modelsummary_wide( models, output = "default", fmt = 3, estimate = "estimate", statistic = "std.error", vcov = NULL, conf_level = 0.95, stars = FALSE, coef_group = NULL, coef_map = NULL, coef_omit = NULL, coef_rename = NULL, gof_map = NULL, gof_omit = NULL, add_rows = NULL, align = NULL, notes = NULL, title = NULL, stacking = "horizontal", ... )
a model or (optionally named) list of models
filename or object type (character string)
determines how to format numeric values
string or `glue` string of the estimate to display (or a vector with one string per model). Valid entries include any column name of the data.frame produced by `get_estimates(model)`. Examples:
vector of strings or `glue` strings which select uncertainty statistics to report vertically below the estimate. NULL omits all uncertainty statistics.
robust standard errors and other manual statistics. The `vcov` argument accepts five types of input (see the 'Details' and 'Examples' sections below):
confidence level to use for confidence intervals
to indicate statistical significance
the name of the coefficient groups to use as columns (NULL or character). If `coef_group` is NULL, `modelsummary` tries to guess the correct coefficient group identifier. To be valid, this identifier must be a column in the data.frame produced by `tidy(model)`. Note: you may have to load the `broom` or `broom.mixed` package before executing `tidy(model)`.
named character vector. Values refer to the variable names that will appear in the table. Names refer to the original term names stored in the model object, e.g. c("hp:mpg"="hp X mpg") for an interaction term. Coefficients that are omitted from this vector will be omitted from the table. The table will be ordered in the same order as this vector.
string regular expression. Omits all matching coefficients from the table using `grepl(perl=TRUE)`.
named character vector. Values refer to the variable names that will appear in the table. Names refer to the original term names stored in the model object, e.g. c("hp:mpg"="hp X mpg") for an interaction term.
string regular expression. Omits all matching gof statistics from the table (using `grepl(perl=TRUE)`).
a data.frame (or tibble) with the same number of columns as your main table. By default, rows are appended to the bottom of the table. You can define a "position" attribute of integers to set the row positions. See Examples section below.
A character string of length equal to the number of columns in the table. "lcr" means that the first column will be left-aligned, the 2nd column center-aligned, and the 3rd column right-aligned.
list or vector of notes to append to the bottom of the table.
direction in which models are stacked: "horizontal" or "vertical"
all other arguments are passed to the `tidy` and `glance` methods used to extract estimates from the model. For example, this allows users to set `exponentiate=TRUE` to exponentiate logistic regression coefficients.
a regression table in a format determined by the `output` argument.