View source: R/panelsummary_raw.R
panelsummary_raw | R Documentation |
'panelsummary_raw' Creates a data.frame for further editing. The data.frame can be directly passed into kableExtra::kbl(), or alternatively, passed into panelsummary::clean_raw() to get typical defaults from kableExtra::kbl().
panelsummary_raw(
...,
mean_dependent = FALSE,
colnames = NULL,
caption = NULL,
format = NULL,
fmt = 3,
estimate = "estimate",
statistic = "std.error",
vcov = NULL,
conf_level = 0.95,
stars = FALSE,
coef_map = NULL,
coef_omit = NULL,
coef_rename = NULL,
gof_map = NULL,
gof_omit = NULL
)
... |
all other arguments are passed through to three functions. See the documentation of these functions for lists of available arguments.
|
mean_dependent |
A boolean. For use with fixest objects only. * 'FALSE' (the default): the mean of the dependent variable will not be shown in the resulting table. * 'TRUE': the mean of the dependent variable will be shown in the resulting table. |
colnames |
An optional vector of strings. The vector of strings should have the same length as the number columns of the table. * 'NULL' (the default): colnames are defaulted to a whitespace, followed by (1), (2), ....etc. |
caption |
A string. The table caption. |
format |
A character string. Possible values are latex, html, pipe (Pandoc's pipe tables), simple (Pandoc's simple tables), and rst. The value of this argument will be automatically determined if the function is called within a knitr document. The format value can also be set in the global option knitr.table.format. If format is a function, it must return a character string. |
fmt |
how to format numeric values: integer, user-supplied function, or
|
estimate |
a single string or a character vector of length equal to the
number of models. Valid entries include any column name of
the data.frame produced by
|
statistic |
vector of strings or
|
vcov |
robust standard errors and other manual statistics. The
|
conf_level |
numeric value between 0 and 1. confidence level to use for
confidence intervals. Setting this argument to |
stars |
to indicate statistical significance
|
coef_map |
character vector. Subset, rename, and reorder coefficients.
Coefficients omitted from this vector are omitted from the table. The order
of the vector determines the order of the table. |
coef_omit |
integer vector or regular expression to identify which coefficients to omit (or keep) from the table. Positive integers determine which coefficients to omit. Negative integers determine which coefficients to keep. A regular expression can be used to omit coefficients, and perl-compatible "negative lookaheads" can be used to specify which coefficients to keep in the table. Examples:
|
coef_rename |
logical, named or unnamed character vector, or function
|
gof_map |
rename, reorder, and omit goodness-of-fit statistics and other model information. This argument accepts 4 types of values:
|
gof_omit |
string regular expression (perl-compatible) used to determine which statistics to omit from the bottom section of the table. A "negative lookahead" can be used to specify which statistics to keep in the table. Examples:
|
A kableExtra object that is instantly customizable by kableExtra's suite of functions.
## Using panelsummary_raw
ols_1 <- lm(mpg ~ hp + cyl, data = mtcars)
panelsummary_raw(ols_1, ols_1)
## Including multiple models------------------
panelsummary_raw(list(ols_1, ols_1, ols_1), ols_1,
caption = "Multiple models",
stars = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.