README.md

blpl

Betsy Levy Paluck Lab R Package

This package is a collection of functions I wrote during my time as lab manager to facilitate transparent social science. This is a place where lab members can share code and functions they have written together, and learn how to contribute to open-source software.

There are loosely two groups of functions that lab members will find most useful. The first is the workhorse tidy_lm function that runs many regressions models with support for clustered standard errors and presents them in a tidy format.

tidy_lm can supports multiple "styles" of models. These are:

y_1 ~ x_1 + x_2 + x_3
y_2 ~ x_1 + x_2 + x_3
y_3 ~ x_1 + x_2 + x_3
y_1 ~ x_1
y_1 ~ x_1 + x_2 
y_1 ~ x_1 + x_2 + x_3
y_2 ~ x_1
y_2 ~ x_1 + x_2 
y_2 ~ x_1 + x_2 + x_3
y_1 ~ x_1
y_1 ~ x_1 + x_2 
y_1 ~ x_1 + x_3
y_1 ~ x_1 + x_2 + x_3
y_2 ~ x_1
y_2 ~ x_1 + x_2 
y_2 ~ x_1 + x_3
y_2 ~ x_1 + x_2 + x_3
y_1 ~ x_1
y_1 ~ x_2 
y_1 ~ x_3
y_2 ~ x_1
y_2 ~ x_2 
y_2 ~ x_3

The second are custom hacks for creating publication quality tables. This is useful for editing tables created by stargazer, knitr::kable or kableExtra. These are numerous and mostly self-explanatory.

To install:

install.packages("devtools")
devtools::install_github("johnhenrypezzuto/blpl")


johnhenrypezzuto/blpl documentation built on Dec. 6, 2019, 2:36 a.m.