extract_model: Extract a standardised model record from a regression object

View source: R/extract.R

extract_modelR Documentation

Extract a standardised model record from a regression object

Description

Internal S3 generic consumed by format_table. Not intended for direct use.

Usage

extract_model(model, vcov_override = NULL, se_override = NULL, ...)

Arguments

model

A fitted model object.

vcov_override

A pre-computed variance-covariance matrix, or NULL to auto-extract.

se_override

A named numeric vector of standard errors, or NULL to auto-extract.

...

Currently unused.

Value

A named list (model record) with the following fields:

coef_names

Character vector of coefficient display names.

coefs

Numeric vector of coefficient estimates.

se

Numeric vector of standard errors.

tstat

Numeric vector of t- or z-statistics.

pval

Numeric vector of two-sided p-values.

nobs

Integer; number of observations.

fit

Named list of fit statistics (R-squared, F-statistic, log-likelihood, etc.; content varies by model type).

fixed_effects

Character vector of fixed-effect variable names; character(0) if none.

reports_fe

Logical; TRUE for models that absorb fixed effects.

se_label

Character; human-readable description of the SE type for use in the table note.

model_label

Character; estimator name for the column header (e.g. "OLS", "Logit", "FE").

dep_var

Character; dependent variable name extracted from the model formula.


stargazer2 documentation built on July 17, 2026, 5:08 p.m.