as.modelsummary_list_custom | R Documentation |
modelsummary_list
Create a customized modelsummary_list
from a model object.
as.modelsummary_list_custom(x, ...)
## Default S3 method:
as.modelsummary_list_custom(x, ...)
## S3 method for class 'fixest'
as.modelsummary_list_custom(x, conf.int = TRUE, ...)
x |
A model object |
... |
Passed on to |
conf.int |
Logical indicating whether or not to include a
confidence interval in the tidied output. Defaults to |
Motivation for this generic comes from the need to save
fixest models. Saving models even with lean = TRUE
can
result in hard to serialize objects, as fixest stores calls
and environments which are difficult to serialise.
A modelsummary_list
object made with modelsummary(models, output = "modelsummary_list")
does most of what we want, except for
adding confindence intervals. modelsummary can add confidence
intervals to tables but want to store it here, so that it is
available for any other use, including plotting. Therefore we use
broom::tidy()
to obtain information on parameters. For the
"glance" part we use broom::tidy()
in the default method but we
use data obtained from modelsummary's custom internal glance
implementation, as it provides useful additions for fixest
models (like adding fixed effects, which we also extend via
modelsummary's customization interface, see
glance_custom.fixest()
, or proper information on the types of
standard errors).
The drawback of this approach is that we can't use some
modelsummary features, like reference categories
and some computations are run twice. This shouldn't be a major
issue for most models and the extra features can be easily
replicated by modifying the modelsummary_list
object.
A modelsummary_list
object, see modelsummary's Extension and Customization
vignette.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.