reg_adjust: Regression Adjustment estimation of ATE or ATT

View source: R/causalFns.R

reg_adjustR Documentation

Regression Adjustment estimation of ATE or ATT

Description

Regression Adjustment estimation of ATE or ATT

Usage

reg_adjust(df, w, y, xs, estimand = c("ATT", "ATE"))

Arguments

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"

Value

fixest model object with robust standard errors (can be summarised again with different clusters)

Examples

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")

apoorvalal/LalRUtils documentation built on Sept. 22, 2023, 5:53 p.m.