Learn R Programming

capybara (version 0.9.3)

augment.feglm: Broom Integration

Description

The provided broom methods do the following:

  1. augment: Takes the input data and adds additional columns with the fitted values and residuals.

  2. glance: Extracts the deviance, null deviance, and the number of observations.`

  3. tidy: Extracts the estimated coefficients and their standard errors.

Usage

# S3 method for feglm
augment(x, newdata = NULL, ...)

# S3 method for felm augment(x, newdata = NULL, ...)

# S3 method for feglm glance(x, ...)

# S3 method for felm glance(x, ...)

# S3 method for feglm tidy(x, conf_int = FALSE, conf_level = 0.95, ...)

# S3 method for felm tidy(x, conf_int = FALSE, conf_level = 0.95, ...)

Value

A tibble with the respective information for the augment, glance, and tidy methods.

Arguments

x

A fitted model object.

newdata

Optional argument to use data different from the data used to fit the model.

...

Additional arguments passed to the method.

conf_int

Logical indicating whether to include the confidence interval.

conf_level

The confidence level for the confidence interval.

Examples

Run this code
set.seed(123)
trade_2006 <- trade_panel[trade_panel$year == 2006, ]
trade_2006 <- trade_2006[sample(nrow(trade_2006), 500), ]

mod <- fepoisson(
  trade ~ log_dist + lang + cntg + clny | exp_year + imp_year,
  trade_2006
)

broom::augment(mod)
broom::glance(mod)
broom::tidy(mod)

Run the code above in your browser using DataLab