gaze: Mimic Stargazer Output to Display Multiple Models

View source: R/gaze.R

gazeR Documentation

Mimic Stargazer Output to Display Multiple Models

Description

Tidy multiple models and display coefficients and test statistics in a side-by-side format.

Usage

gaze(
  ...,
  include_glance = TRUE,
  glance_vars = c("adj.r.squared", "sigma", "AIC"),
  digits = 3
)

Arguments

...

models to be tidied. Arguments may be named or unnamed. For named arguments, the model will be identfied by the argument name; for unnamed arguments, the object name will be the identifier.

include_glance

logical(1) Determines if glance (fit) statistics are displayed under the models.

glance_vars

character. A vector of statistics returned by glance that are to be displayed for each model. Defaults are subject to change in future versions.

digits

numeric(1) The number of digits used for rounding.

Details

This function is still in development. Significant stars will be added in a future version. Note that function defaults may be subject to change.

Functional Requirements

  1. Return a data frame object

  2. Cast an error if include_glance is not logical(1)

  3. Cast an error if glance_vars is not a character vector.

  4. Cast an error if digits is not "integerish(1)".

Examples

fit1 <- lm(mpg ~ qsec + am + wt + gear + factor(vs), data = mtcars)
fit2 <- lm(mpg ~ am + wt + gear + factor(vs), data = mtcars)

gaze(fit1, fit2)
gaze(with_qsec = fit1, 
     without_qsec = fit2)
gaze(fit1, fit2, include_glance = FALSE)
gaze(fit1, fit2, glance_vars = c("AIC", "BIC"))


pixiedust documentation built on Oct. 10, 2023, 9:07 a.m.