Skip to contents

att estimates the average treatment effect on the treated (ATT) from an hbal object returned by hbal.

Usage

att(hbalobject, method="lm_robust", dr=TRUE, displayAll=FALSE, ...)

Arguments

hbalobject

an object of class hbal as returned by hbal.

method

estimation method for the ATT. Default is the Lin (2016) estimator.

dr

doubly robust, whether an outcome model is included in estimating the ATT.

displayAll

only displays treatment effect by default.

...

arguments passed to lm_lin or lm_robust

Value

A matrix of estimates with their robust standard errors

Details

This is a wrapper for lm_robust and lm_lin from the estimatr package.

Author

Yiqing Xu, Eddie Yang

Examples

#EXAMPLE 1
set.seed(1984)
N <- 500
X1 <- rnorm(N)
X2 <- rbinom(N,size=1,prob=.5)
X <- cbind(X1, X2)
treat <- rbinom(N, 1, prob=0.5) # Treatment indicator
y <- 0.5 * treat + X[,1] + X[,2] + rnorm(N) # Outcome
dat <- data.frame(treat=treat, X, Y=y)
out <- hbal(Treat = 'treat', X = c('X1', 'X2'), Y = 'Y', data=dat)
sout <- summary(att(out))