Learn R Programming

hbal (version 1.2.8)

att: Estimating the ATT from an hbal object

Description

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, ...)

Value

A matrix of estimates with their robust standard errors.

Arguments

hbalobject

an object of class hbal as returned by hbal.

method

estimation method for the ATT. The default is the Lin (2013) estimator.

dr

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

...

arguments passed to lm_lin or lm_robust

Author

Yiqing Xu, Eddie Yang

Details

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

Examples

Run this code
#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))

Run the code above in your browser using DataLab