as_tibble.fixest_multi: Convert a 'fixest_multi' object to a nested tibble

View source: R/fixest.R

as_tibble.fixest_multiR Documentation

Convert a fixest_multi object to a nested tibble

Description

Convert a fixest_multi object to a nested tibble, allowing easy tidying of the models.

Usage

## S3 method for class 'fixest_multi'
as_tibble(x)

Arguments

x

A fixest_multi object

Details

Only an as_tibble method is provided, no as.data.frame because printing lists in a data.frame is often problematic. fixest::models(), which is used internally, always returns a data.frame.

Value

A tibble with model parameters and model IDs as columns and a list column model with all models from x. Note that the tibble will not contain columns for parameters which do not vary within x (see examples).

Examples

# Results only in an `lhs` column
m1 <- fixest::feols(c(mpg, qsec) ~ wt, data = mtcars)
tibble::as_tibble(m1)

# Results only in an `rhs` column
m2 <- fixest::feols(mpg ~ csw(wt, disp), data = mtcars)
tibble::as_tibble(m2)


svraka/asmisc documentation built on June 12, 2025, 12:04 p.m.