*! version 1.1.1 21dec2016

help mtebinary

Title

mtebinary - Marginal Treatment Effects (MTE) With a Binary Instrument

Note: mtebinary is the new version of the command mtemore.
It generates results from Kowalski (May 2018).

Syntax

mtebinary outcome (endogvar = instrument) [covariates] [, options]

outcome is the outcome variable; can be binary, discrete or continuous.

endogvar is the endogenous variable; must be binary.

instrument is the instrument; must be binary.

covariates is the list of covariates used for MTE estimation.

options

Estimation

poly(#) specify functional form of the MTE with covariates; default is poly(1).

reps(#) specify number of bootstrap replications; default is reps(200).

seed(#) specify random-number seed for bootstrapping; default is seed(6574358).

bootsample(opt) specify bootstrapping options; opt may be strata(varlist),
cluster(varlist), or weight(varname);default is nothing,
i.e., simple sampling with replacement.

weightvar(varname) specify a (frequency or probability) weight variable varname;
default is no weighting.

Post-Estimation

summarize(varlist) specify variables for summary statistics computation.

graphsave(graphsave) specify the PDF file name for saving the graphed output,
default is graphsave(mtegraph).

Description

mtebinary estimates the marginal treatment effect (MTE) function using a binary instrument and
a binary endogenous variable. The MTE is defined as the difference between the potential treated outcome
and the potential untreated outcome for an individual for whom the net benefit of treatment equals the
net cost of treatment, i.e., an individual marginal to selecting into treatment (see Kowalski (2016, 2018) for
details).

mtebinary can implement MTE estimation with and without covariates. All statistical significance is assessed using bootstrapping. Observations with missing values for the outcome or
any specified covariates will be dropped prior to any estimation (including summary statistics).

Prior to MTE estimation, variables (e.g., covariates) for summary statistics may be specified using
the summarize option. Means and standard deviations are provided for the groups of always takers,
compliers and never takers. Means and standard deviations of differences between always takers and
compliers, and between compliers and never takers are also provided.

If no covariates are specified, mtebinary estimates and graphs the marginal treated outcome
MTO(p), marginal untreated outcome MUO(p), and marginal treatment effect MTE(p) functions.
mtebinary estimates the treated outcomes, untreated outcomes, and treatment effects for the always
takers, compliers and never takers groups. mtebinary also computes the differences in untreated
outcomes and treated outcomes for the treated outcome test and the untreated outcome test.

If covariates are specified, mtebinary can estimate a nonlinear polynomial MTE(X,p) function.
If no polynomial order is specified by the in the poly option, mtebinary by default estimates
a linear MTE(X,p) function. mtebinary outputs the functional forms for the average marginal untreated
outcome E[MUO(X,p)], the average marginal treated outcome E[MTO(X,p)], and the average marginal treatment
effect E[MTE(X,p)]. mtebinary also graphs the average marginal treatment effect E[MTE(X,p)],
the minimum marginal treatment effect minMTE(X,p), and the maximum treatment effect maxMTE(X,p).

For details on terminology, methodology, and estimation, see Kowalski (May 2018), Kowalski (August 2016)
and Kowalski (July 2018).

Options

Estimation

poly(#) specifies the functional form of the MTE with covariates. A non-linear polynomial,
poly>1, is only available if covariates is not empty (i.e., when estimating the MTE with covariates).
The default, regardless of whether covariates are specified or not, is poly(1) (a linear MTE).

reps(#) specifies the number of bootstrap replications. The default is reps(200).

seed(#) specifies the random-number seed for bootstrapping. The number of bootstrap replications should
be 2 or higher. The default is seed(6574358).

bootsample(opt) specifies optional bootstrap sampling options. opt may be
strata(varlist), cluster(varlist), or weight(varname). These options
are applied in the standard fashion as implemented by Stata. If no options are specified, the command uses
simple sampling with replacement. For more information on these options, please see the respective Stata help
files.

weightvar(varname) specifies a frequency or probability weight varname for inclusion in the estimation
of average characteristics of the always takers, compliers and never takers (if the summarize() option is specified). It is
also the weight used in the propensity score regression in the MTE estimation algorithm. The default is no weighting.

Post-Estimation

summarize(varlist) specifies additional variables for summary statistics computation. If no covariates are specified
the command will skip this funtionality.

graphsave(name) specifies the PDF file name for saving the graphed output. The default is
graphsave(mte_graph), saved in the working directory.

Examples

The example data provided with this command replicates the hypothetical examples from Kowalski(July 2018).
Example 1 replicates the results of the MTE without covariates reported in this paper. Examples 2 and 3 mimic
the estimation of the MTE functions in Kowalski(July 2016, May 2018) but use a hypothetical data set and a simplified
set of covariates. Examples 1 and 2 set the number of bootstrap replications to 0 in order for the command
to run quickly. Example 3, which sets the number of bootstrap replications to the default number, 200, will
require some time.

Install the mtebinary package.

. ssc install mtebinary

Download example data, which is placed in the user's current directory.

. net get mtebinary

Load the example data

. use mtebinary_data.dta

Example 1: Linear MTE without covariates and standard errors, summarize covariates.

. mtebinary Y2 (D = Z), reps(0) summarize(age female) graphsave(mte)

Example 2: Linear MTE with covariates and without standard errors.

. mtebinary Y2 (D = Z) age female, reps(0) graphsave(mte_cov)

Example 3: Quadratic MTE with covariates. Bootstrap for MTE with covariates will require some time.

. mtebinary Y2 (D = Z) age female, poly(2) graphsave(mte_cov_quad)

Stored results

mtebinary saves the following results in e():

Scalars

e(N) Number of observations

e(reps) Number of bootstrap replications

e(poly) Polynomial degree of the MTE function

Matrices

e(averages) Summary statistics

Without covariates

e(MTE) Marginal treatment effect function MTE(p)

e(MTO) Marginal treated outcome function MTO(p)

e(MUO) Marginal untreated outcome function MUO(p)

e(Treatment_Effect) Treatment effects

e(Treated_Outcome) Treated outcomes

e(Untreated_Outcome) Untreated outcomes

With covariates

e(beta_to) Covariate coefficients from separate estimation among the treated

e(beta_uo) Covariate coefficients from separate estimation among the untreated

e(EMTE) Average Marginal Treatment Effect function E[MTE(X,p)]

e(EMTO) Average Marginal Treated Outcome function E[MTO(X,p)]

e(EMUO)]) Average Marginal Untreated Outcome function E[MUO(X,p)]

e(Treatment_Effect) Treatment effects

e(Treated_Outcome) Treated outcomes

e(Untreated_Outcome) Untreated outcomes

All estimates in the matrices listed above are saved with their 95% confidence intervals.

References

Amanda Kowalski, 2018 "Extrapolation using selection and moral hazard heterogeneity
from within the Oregon health insurance experiment", NBER Working Paper 24647, May 2018.

Amanda Kowalski, 2016 "Doing More When You're Running LATE: Applying Marginal Treatment Effect Methods to
Examine Treatment Effect Heterogeneity in Experiments", NBER Working Paper 22363, July 2016.

Amanda Kowalski, 2018 "How to Examine External Validity Within an Experiment", NBER Working Paper 24834, July 2018.

Disclaimer

THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED. THE ENTIRE
RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.

IN NO EVENT WILL THE COPYRIGHT HOLDERS OR THEIR EMPLOYERS, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THIS SOFTWARE BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM.

Authors

Amanda Kowalski, Yen Tran, and Ljubica Ristovska

Yale University, Yale University, and NBER

kowalski@nber.org / yen.tran@yale.edu / lristovs@nber.org

Latest Version: June 2018 / First Version: December 2016