extract_gofchr: Extracting GOFs from Models for Footnote using 'extract()'...

Description Usage Arguments Value

View source: R/plot_coef.R

Description

Extracting GOFs from Models for footnote using extract() function from texreg package.

Usage

1
2
3
4
5
6
7
8
9
extract_gofchr(
  m,
  m.names = NULL,
  nobs = "right",
  gof.extracts = c("AIC", "Adj. R$^2$", "Log Likelihood"),
  gof.reorder = NULL,
  linebreak = TRUE,
  ...
)

Arguments

m

Single model object or the list of model objects.

m.names

The names for models (character vector). The default is NULL, but required when there are multiple models in the input.

nobs

The position of "number of observation (N)" to be printed. The default is "right" (the end of the sentence). "left" (the start of the sentence) and "none" (do not print number of observation) are also available.

gof.extracts

The GOF measures to be included in the output (character/character vector). The default is c("AIC", "Adj. R$^2$", "Log Likelihood"). If "all", then all GOFs extracted by extract() function are included in texts. If "none" and nobs is not "none", then only number of observation will be printed.

gof.reorder

The numeric vector specifying the alternative order of GOF (e.g., if there are three GOFs, and you want to flip the order of first and second GOF, then input <code>c(2,1,3)</code>). The length of the vector must correspond with the number of <i>exported</i> GOFs (it may not be the same as the length of <code>gof.extracts</code>). If <code>NULL</code> (default), the original order is used. The order does not include the number of observation (if exported).

linebreak

Include linebreak between model (boulean). If TRUE (default), linebreak will be included between models. If FALSE, the ouput will be single line. Only applicable when there are more than one model.

...

Additional arguments passed to extract() function.

Value

A character vector, including GOFs and number of observations of results. Subsequently used within plot_coef function.


gentok/estvis documentation built on April 2, 2020, 1:58 p.m.