estimatr (version 0.14)

starprep: Prepare model fits for stargazer

Description

Prepare model fits for stargazer

Usage

starprep(..., stat = c("std.error", "statistic", "p.value", "ci", "df"),
  se_type = NULL, clusters = NULL, alpha = 0.05)

Arguments

...

a list of lm_robust or lm objects

stat

either "std.error" (the default), "statistic" (the t-statistic), "p.value", "ci", or "df"

se_type

(optional) if any of the objects are lm objects, what standard errors should be used. Must only be one type and will be used for all lm objects passed to starprep. See `commarobust` for more.

clusters

(optional) if any of the objects are lm objects, what clusters should be used, if clusters should be used. Must only be one vector and will be used for all lm objects passed to starprep. See `commarobust` for more.

alpha

(optional) if any of the objects are lm objects, what significance level should be used for the p-values or confidence intervals

Value

a list of vectors of extracted statistics for stargazers

Details

Used to help extract statistics from lists of model fits for stargazer. Prefers lm_robust objects, but because `stargazer` does not work with `lm_robust` objects, `starprep` can also take `lm` objects and calls `commarobust` to get the preferred, robust statistics.