Package 'hettreatreg'

Title: Heterogeneous Treatment Effects in Regression Analysis
Description: Computes diagnostics for linear regression when treatment effects are heterogeneous. The output of '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), <http://people.brandeis.edu/~tslocz/Sloczynski_paper_regression.pdf>.
Authors: Tymon Sloczynski [aut], Mark McAvoy [cre]
Maintainer: Mark McAvoy <[email protected]>
License: GPL-2
Version: 0.1.0
Built: 2024-10-31 20:35:26 UTC
Source: https://github.com/tslocz/hettreatreg

Help Index


OLS Weights on Heterogeneous Treatment Effects

Description

Computes diagnostics for linear regression when treatment effects are heterogeneous.

Usage

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, [email protected], http://people.brandeis.edu/~tslocz/

Maintained by: Mark McAvoy, Brandeis University, [email protected]

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

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

National Supported Work – Current Population Survey (NSW–CPS)

Description

The data set combines a subsample of the experimental treated units from NSW, constructed by Dehejia and Wahba (1999), with "CPS-1," a nonexperimental comparison group from CPS, constructed by LaLonde (1986).

Usage

nswcps

Format

An object of class data.frame with 16177 rows and 11 columns.

Value

A data frame with 11 variables:

treated

1 if treated, 0 otherwise

age

age

age2

age squared

educ

years of schooling

black

1 if black, 0 otherwise

hispanic

1 if Hispanic, 0 otherwise

married

1 if married, 0 otherwise

nodegree

1 if high school dropout, 0 otherwise

re74

real earnings in 1974

re75

real earnings in 1975

re78

real earnings in 1978

References

Dehejia, R. H. and Wahba, S. (1999). "Causal Effects in Nonexperimental Studies: Reevaluating the Evaluation of Training Programs," Journal of the American Statistical Association, 94:1053–1062.

LaLonde, R. J. (1986). "Evaluating the Econometric Evaluations of Training Programs with Experimental Data," American Economic Review, 76:604–620.