Learn R Programming

modelsummary (version 0.2.1)

extract_statistic_override: Allow users to override uncertainty estimates

Description

Allow users to override uncertainty estimates

Usage

extract_statistic_override(model, statistic_override, statistic = "std.error")

Arguments

model

object type with an available `tidy` method.

statistic_override

manually override the uncertainy estimates. This argument accepts three types of input:

  • a function or list of functions of length(models) which produce variance-covariance matrices with row and column names equal to the names of your coefficient estimates. For example, `R` supplies the `vcov` function, and the `sandwich` package supplies `vcovHC`, `vcovHAC`, etc.

  • a list of length(models) variance-covariance matrices with row and column names equal to the names of your coefficient estimates.

  • a list of length(models) vectors with names equal to the names of your coefficient estimates. Numeric vectors are formatted according to `fmt` and placed in brackets, character vectors printed as given.

statistic

string name of the statistic to include in parentheses below estimates. Must be either "conf.int", or one of the column names produced by the `broom::tidy` function. Typical values include: "std.error", "conf.int", "statistic", "p.value". A character vector will stack several uncertainty estimates on top of one another (in different rows).

Value

a numeric vector of test statistics