help for hettreatreg

Title

hettreatreg -- Diagnostics for linear regression when treatment effects are heterogeneous

Syntax

hettreatreg
indepvars
[if] [in],
outcome(varname) treatment(varname) [options]

Required
outcome(varname) designate an outcome variable

treatment(varname) designate a binary treatment variable

Optional
noisily display model estimation output

vce(vcetype) vcetype may be ols, robust,
cluster clustvar, bootstrap, jackknife,
hc2, or hc3; default is ols

Description

hettreatreg represents 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 (2022) for the underlying theoretical results and further details.

The options outcome and treatment are required. They 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. indepvars 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 (2022) for further details.

If the option noisily is specified, hettreatreg also displays the usual regression output, as obtained
by regress. The option vce specifies the type of standard error for regress. Using outreg2
provides the same output after regress and hettreatreg, with hettreatreg offering the additional advantage of
reporting the diagnostics from Sloczynski (2022), including the OLS weights on ATT and ATU. See an example
below. Statistical inference may proceed using bootstrap. An example is also provided below.

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

References

Sloczynski, Tymon (2022). "Interpreting OLS Estimands When Treatment Effects Are Heterogeneous: Smaller Groups Get Larger
Weights." Review of Economics and Statistics 104(3), 501–509. Available at https://doi.org/10.1162/rest_a_00953.

Examples

. ssc install hettreatreg, all

. use nswcps, clear

. regress re78 treated age-re75, vce(robust)

. hettreatreg age-re75, o(re78) t(treated) noisily vce(robust)

. hettreatreg age-re75, o(re78) t(treated)

. outreg2 using myfile, excel keep(treated) e(p1 w1 w0 delta ate att atu)

. bootstrap e(w1) e(w0) e(delta) e(ate) e(att) e(atu), seed(123456789): hettreatreg age-re75, o(re78) t(treated)

Stored results

Scalars

e(N) number of observations

e(r2) R-squared, as obtained by regress

e(ols1) OLS estimate of the treatment effect, as obtained by regress

e(ols2) OLS estimate of the treatment effect, obtained as e(w1)*e(att)+e(w0)*e(atu)

e(ate) implicit OLS estimate of ATE

e(att) implicit OLS estimate of ATT

e(atu) implicit OLS estimate of ATU

e(p1) proportion of treated units

e(p0) proportion of untreated units

e(w1) OLS weight on ATT

e(w0) OLS weight on ATU

e(delta) diagnostic for interpreting OLS as ATE

Macros

e(cmd) hettreatreg

e(cmdline) command as typed

e(depvar) name of dependent (outcome) variable

e(properties) b V

Matrices

e(b) coefficient vector, as obtained by regress

e(V) variance-covariance matrix, as obtained by regress

Functions

e(sample) marks estimation sample

Author

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

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