Extract goodness-of-fit statistics a tidy format.

Description

A unified approach to extract results from a wide variety of models.

Usage

get_gof(model, gof_function = NULL, vcov_type = NULL, ...)

Arguments

model a single model object
gof_function function which accepts a model object in the model argument and returns a 1-row data.frame with one custom goodness-of-fit statistic per column.
vcov_type string vcov type to add at the bottom of the table
…

all other arguments are passed through to three functions. See the documentation of these functions for lists of available arguments.

  • parameters::model_parameters extracts parameter estimates. Available arguments depend on model type, but include:

    • standardize, include_reference, centrality, dispersion, test, ci_method, prior, diagnostic, rope_range, power, cluster, etc.

  • performance::model_performance extracts goodness-of-fit statistics. Available arguments depend on model type, but include:

    • metrics, estimator, etc.

  • tinytable::tt, kableExtra::kbl or gt::gt draw tables, depending on the value of the output argument. For example, by default modelsummary creates tables with tinytable::tt, which accepts a width and theme arguments.

Value

A dataframe with the goodness-o-fit statistics. The backend attribute indicates the backend used to extract them. Moreover, for some models get_gof attaches useful attributes to the output. You can access this information by calling the attributes function attributes(get_estimates(model)).