hettreatreg: OLS Weights on Heterogeneous Treatment Effects

Description Usage Arguments Details Value Author(s) References Examples

View source: R/hettreatreg.R

Description

Computes diagnostics for linear regression when treatment effects are heterogeneous.

Usage

1
hettreatreg(outcome, treatment, covariates, verbose = FALSE)

Arguments

outcome

the outcome variable.

treatment

the treatment variable. The variable must be binary and coded 0 for the untreated units and 1 for the treated units.

covariates

the list of control variables. The list must not include the treatment variable.

verbose

logical. If TRUE estimation output is displayed.

Details

hettreatreg represents ordinary least squares (OLS) estimates of the effect of a binary treatment as a weighted average of the average treatment effect on the treated (ATT) and the average treatment effect on the untreated (ATU). The program estimates the OLS weights on these parameters, computes the associated model diagnostics, and reports the implicit OLS estimate of the average treatment effect (ATE). See Sloczynski (2019) for the underlying theoretical results and further details.

The arguments outcome and treatment are used to designate an outcome variable and a treatment variable, respectively. The treatment variable must be binary and coded 0 for the untreated units and 1 for the treated units. covariates is a list of control variables that must not include the treatment variable.

hettreatreg displays a number of statistics. OLS is the estimated regression coefficient on the treatment variable. P(d=1) and P(d=0) are the sample proportions of treated and untreated units, respectively. w1 and w0 are the OLS weights on ATT and ATU, respectively. delta is a diagnostic for interpreting OLS as ATE. ATE, ATT, and ATU are the implicit OLS estimates of the corresponding parameters. See Sloczynski (2019) for further details.

If you use this program in your work, please cite Sloczynski (2019).

Value

OLS

OLS estimate of the treatment effect

P(d=1)

proportion of treated units

P(d=0)

proportion of untreated units

w1

OLS weight on ATT

w0

OLS weight on ATU

delta

diagnostic for interpreting OLS as ATE

ATE

implicit OLS estimate of ATE

ATT

implicit OLS estimate of ATT

ATU

implicit OLS estimate of ATU

Author(s)

Tymon Sloczynski, Brandeis University, tslocz@brandeis.edu, http://people.brandeis.edu/~tslocz/

Maintained by: Mark McAvoy, Brandeis University, mcavoy@brandeis.edu

Please feel free to report bugs and share your comments on this program.

References

Sloczynski, Tymon (2019). "Interpreting OLS Estimands When Treatment Effects Are Heterogeneous: Smaller Groups Get Larger Weights." Available at http://people.brandeis.edu/~tslocz/Sloczynski_paper_regression.pdf.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
# load package
library(hettreatreg)

# read in data
data("nswcps")

# save the outcome variable
outcome <- nswcps$re78

# save the treatment variable
treated <- nswcps$treated

# select control variables
our_vars <- c("age", "age2", "educ", "black", "hispanic", "married", "nodegree")
covariates <- subset(nswcps, select = our_vars)

# run function
results <- hettreatreg(outcome, treated, covariates)
print(results)

hettreatreg documentation built on July 2, 2020, 2:26 a.m.