RegToDT: Output Regression Results to data.table

Description Usage Arguments Value Examples

Description

Output Regression Results to data.table

Usage

1
2
RegToDT(reg.model, digits = 3, print.tstat = FALSE, sig.levels = c(0.01,
  0.05, 0.1), sig.symbols = c("***", "**", "*"))

Arguments

reg.model

Regression model, e.g. an lm object.

digits

Number of digits to round coefficients, standard errors.

print.tstat

Should t-stats be displayed instead of standard errors?

sig.levels

Significance levels based on which stars should be assigned, if any.

sig.symbols

Significance symbols to assign. Should be in descending order of significance.

Value

A data.table of regression coefficients, standard errors (or t-stats), R-squared, number of observations. Standard errors (or t-stats) are labelled starting with "_SE_". If available (e.g. for an felm object), the R-squared of the projected model is displayed. If a 2SLS model is estimated via felm, the F-statistic of the first stage is displayed instead of R-squareds.

Examples

1
2
reg.results <- lm(mpg ~ disp + hp, mtcars)
RegToDT(reg.results)

laszlo-jakab/laszlor documentation built on May 31, 2019, 2:25 p.m.