reg_adjust | R Documentation |
Regression Adjustment estimation of ATE or ATT
reg_adjust(df, w, y, xs, estimand = c("ATT", "ATE"))
df |
dataframe |
w |
treatment name |
y |
outcome name |
xs |
vector of covariate names |
estimand |
: runs Lin regression when "ATE" and Oaxaca-Blinder-Kitagawa when "ATT" |
fixest model object with robust standard errors (can be summarised again with different clusters)
data(lalonde.psid); data(lalonde.exp);
y = "re78"; w = "treat"; xs = setdiff(colnames(lalonde.psid), c(y, w))
cat("ATE in experimental sample \n")
reg_adjust(lalonde.exp, 'treat', 're78', xs, "ATE")
cat(" --------------------------- \n")
cat("ATT in obs sample \n")
reg_adjust(lalonde.psid, 'treat', 're78', xs, "ATT")
cat(" --------------------------- \n")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.