Welcome to Regression Tools documentation!

High-level Regression Utilities

To get started, look here.

An overview of regtools

This package makes it easier to run various kinds of regressions. Handles fixed effects, 2+ way clustering, hypothesis testing, lagged variables, differenced variables, interaction effects, iteration tools, and producing summaries for a variety of models including OLS, Logit, Probit, Quantile, and Fama-Macbeth.

Single Regressions

reg(df, yvar, xvars[, robust, …])

Returns a fitted regression.

linear_reg(df, yvar, …)

Runs a regression from the linearmodels library, standardizing the output to that of statsmodels

diff_reg(df, yvar, …)

Fits a differenced regression.

quantile_reg(df, yvar, xvars)

Returns a fitted quantile regression.

Produce Summary

produce_summary(reg_list)

Produce a summary from a list of regression results

Iteration Tools

reg_for_each_combo(df, yvar, xvars)

Takes each possible combination of xvars (starting from each var individually, then each pair of vars, etc.

reg_for_each_xvar_set(df, …)

Runs regressions on the same y variable for each set of x variables passed.

reg_for_each_combo_select_and_produce_summary(df, …)

Convenience function to run regressions for every combination of xvars, select the best models, and present them in a summary format.

reg_for_each_xvar_set_and_produce_summary(df, …)

Convenience function to run regressions for every set of xvars passed and present them in a summary format.

reg_for_each_yvar(df, yvars, xvars)

Convenience function to run regressions for multiple y variables with the same x variables

reg_for_each_yvar_and_produce_summary(df, …)

Convenience function to run regressions for multiple y variables with the same x variables and and present them in a summary format.

reg_for_each_lag(df, yvar, xvars)

Convenience function to run regressions with the same y and x variables for every passed number of lags

reg_for_each_lag_and_produce_summary(df, …)

Convenience function to run regressions with the same y and x variables for every passed number of lags and produce a summary.

Hypothesis Testing

select_models(reg_list, …)

Takes a list of fitted regression models and selects among them based on adjusted R-Squared.

Selecting Models

hypothesis_test(…)

Perform a hypothesis test with one or multiple columns

Indices and tables