View source: R/balance_regression.R
balance_regression | R Documentation |
balance_regression() Runs a LPM of treatment status against all covariates (treatment~X'B).
balance_regression(data, treatment)
data |
A data.frame, tibble or data.table |
treatment |
a string with treatment status column |
This functions runs a Linear Probability model of each treatment group & control on all the columns in data. For instance, if treatment column has values of (0,1,2), balance_regression will run two models: 1) LPM(treatment(0,1)~X'b) and 2) LPM(treatment(0,2)~X'b). The value are the regression tables and details of the F_test of these models.
A list: regression_tables = regression output of treatment against all covariates, F_test = table with the F tests of each regression
data <-data.frame(x1 = rnorm(n = 100, mean = 100, sd = 15), x2= rnorm(n = 100, mean = 65), treat = rep(c(0,1,2,3,4), each = 20)) balance_regression(data = data, treatment = "treat")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.