*! version 1.1.1 21dec2016

help mtemore

Title

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

Note: mtemore is the old version of the command mtebinary.
mtemore was designed to produce results from Kowalski (July 2016), and mtebinary
was designed to produce results from Kowalski (May 2018).

Syntax

mtemore 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(6574357).

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.

nointeract estimate the MTE with covariates without interaction terms between covariates
and instrument; default is to interact.

Post-Estimation

nodecomp suppress output containing selection and treatment effect decomposition.

summarize(varlist) specify additional variables for summary statistics computation;
default is summarize(outcome [predicted_outcome]).

didtest(varlist) specify additional dependent variables in the internal validity test and the
difference-in-difference test; default is didtest(outcome [predicted_outcome]).

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

Description

mtemore 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 cost of treatment, i.e., an
individual marginal to selecting into treatment (see Kowalski (July 2016) and Kowalski (May 2018) for details).

mtemore can implement both 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 and tests for internal
and external validity).

mtemore outputs sample counts and summary statistics for the outcome prior to MTE estimation. The
predicted outcome, estimated among lottery losers but predicted among the entire sample, is summarized
if covariates are included. Additional variables (e.g., covariates) for summary statistics may be specified using
the summarize option. Means and sample counts are provided for the Randomized Intervention Sample (RIS, the
full sample), Intervention (I, lotteried in), Baseline (B, lotteried out), Randomized Intervention Sample Treated
(RIST, treated), Randomized Intervention Sample Untreated (RISU, untreated), Baseline Treated (BT, always takers),
Baseline Untreated (BU, never takers and control compliers), Intervention Treated (IT, always takers and treated
compliers), Intervention Untreated (IU, never takers), Local Average Treated (LAT, treated compliers), Local
Average Untreated (LAU, untreated compliers), and the Local Average (LA, all compliers).

Prior to MTE estimation, mtemore outputs results from the internal validity and
difference-in-difference tests introduced in Kowalski (July 2016), with the outcome as the dependent variable. If
covariates are specified, mtemore also outputs the results for these tests with the predicted outcome as the
dependent variable. Additional variables (e.g., covariates) as dependent variables for these tests can be specified
using the didtest option. To avoid oversampling of missing values and ensure reproducibility of bootstrapped samples,
each variable specified for the internal validity and difference-in-difference test is bootstrapped separately.

If no covariates are specified, mtemore estimates and graphs the marginal treated outcome MTO(p),
marginal untreated outcome MUO(p), and marginal treatment effect functions. mtemore estimates the treated outcomes,
untreated outcomes, and treatment effects for the aforementioned BT, BU, IT, IU, RIST, RISU, LA, and average (A) groups.
Unless nodecomp is specified, mtemore will also output the decomposition of the treated outcome into selection
and treatment effect for each of the aforementioned groups of interest, the baseline OLS (BOLS), the intervention OLS (IOLS),
and the randomized intervention sample OLS (RISOLS), and the decomposition of BOLS, IOLS, and RISOLS into selection and
treatment effect.

If covariates are specified, mtemore can estimate a nonlinear polynomial MTE(x,p) function. If no
polynomial order is specified by the in the poly option, mtemore by default estimates a linear MTE(x,p)
function. mtemore graphs the SMTE(p), minMTE(x,p), and maxMTE(x,p) and outputs the functional forms for SMTE(p),
SMTO(p), and SMUO(p). Additionally, mtemore estimates the treated outcomes, untreated outcomes, and treatment
effects for the BT, BU, IT, IU, RIST, RISU, LA, and A groups using the MTE with covariates. Finally, mtemore
outputs the RMSD of the MTE with covariates, as well as the fraction explained and unexplained heterogeneity from
the user-specified covariates.

For details on terminology, methodology, and estimation, see Kowalski (July 2016),
Kowalski (May 2018) and Kowalski (July 2018). The command outputs a legend for the output at the end of each execution.

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(6574357).

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
MTE estimation. The default is no weighting.

nointeract suppresses the interaction terms between covariates and instrument when estimating the
MTE with covariates. Interaction terms between covariates and instrument are only included in the
propensity score estimation regression, as per Kowalski (July 2016). The default is to include the interaction terms.

Post-Estimation

nodecomp suppresses the output containing the selection and treatment effect decomposition. The output
includes a decomposition of the treated outcome and OLS estimates into a selection and treatment effect. The output
is only available for the MTE without covariates.

summarize(varlist) specifies additional variables for summary statistics computation. The default is
summarize(outcome [pred_outcome]). The summary statistics for the predicted outcome are output if covariates
are specified.

didtest(varlist) specifies additional dependent variables in the internal validity test and the
difference-in-difference test. The default is didtest(outcome [pred_outcome]). Results from the tests with the
predicted outcome as the dependent variable are output if covariates are specified.

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

Examples

Examples implement the mtemore command using a hypothetical dataset
to replicate the results in Kowalski (July 2018)'s paper.

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

net get mtemore

Load the example data

. use mtemore_data.dta

Example 1: Linear MTE without covariates, summarize covariates.

. mtemore Y2 (D = Z), summarize(age female) graphsave(mtemore)

Example 2: Linear MTE with covariates. Bootstrap for MTE with covariates might require some time.

. mtemore Y2 (D = Z) age female, reps(50) graph(mte_cov)

Example 3: Linear MTE with covariates, no interaction terms

. mtemore Y2 (D = Z) age female, nointeract reps(50) graph(mte_cov_noint)

Example 4: Quadratic MTE with covariates

. mtemore Y2 (D = Z) age female, poly(2) graph(mte_cov_quad)

Stored results

mtemore 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

e(internal_valid) Results from internal validity test

e(did_reg) Results from difference-in-difference test

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(TE) Treatment effects

e(TO) Treated outcomes

e(UO) Untreated outcomes

e(selection) Selection effect decomposition of treated outcomes

e(treatment) Treatment effect decomposition of treated outcomes

e(OLS_est) BOLS, IOLS, and RISOLS estimates

e(OLS_selection) Selection effect decomposition of OLS estimates

e(OLS_treatment) Treatment effect decomposition of OLS estimates

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(SMTE) Sample Marginal Treatment Effect function SMTE(p)

e(SMTO) Sample Marginal Treated Outcome function SMTO(p)

e(SMUO) Sample Marginal Untreated Outcome function SMUO(p)

e(minMTE) The minimum MTE(x,p)

e(maxMTE) The maximum MTE(x,p)

e(STE) Treatment effects

e(STO) Treated outcomes

e(SUO) Untreated outcomes

e(RMSD) RMSD, fraction explained and unexplained heterogeneity

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, 2016 "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: December 2016 / First Version: December 2016