help npsynth

Title

npsynth - Nonparametric Synthetic Control Method

Syntax

npsynth
outcome
varlist,
trperiod(#)
bandw(#)
panel_var(varname)
time_var(varname)
trunit(#)
kern(kerneltype)
[npscv
n_grid(#1,#2)
save_res(filename)
w_median
gr_y_name(name)
gr_tick(#)
gr1
gr2
gr3
save_gr1(graphname1)
save_gr2(graphname2)
save_gr3(graphname3)]

Description

npsynth extends the Synthetic Control Method (SCM)
for program evaluation proposed by Abadie and Gardeazabal (2003) and Abadie, Diamond,
and Hainmueller (2010) to the case of a nonparametric identification of the synthetic
(or counterfactual) time pattern of a treated unit. The model assumes that the treated unit
- such as a country, a region, a city, etc. - underwent a specific intervention in a given year,
and estimates its counterfactual time pattern, the one without intervention, as a weighted linear combination of
control units based on the predictors of the outcome. The nonparametric imputation of the counterfactual is computed using
weights proportional to the vector-distance between the treated unit's and the controls' predictors, using a kernel function with pre-fixed bandwidth.
The routine provides a graphical representation of the results for validation purposes.

According to the npsynth syntax:

outcome: is the target variable over which measuring the impact of the treatment

varlist: is the set of covariates (or observable confounding) predicting the outcome in the pre-treatment period

kern(kerneltype) specifies the type of kernel function to use for building synthetic weights.

trunit(#) specifies the treated unit, with value # in 'panel_var'.

trperiod(#) specifies the time in which treatment starts.

bandw(#) specifies the bandwidth of the kernel weighting function.

panel_var(varname) specifies the panel variable.

time_var(varname) specifies the time variable.

Options

npscv: allows for computing the optimal bandwidth minimizing the pre-treatment RMSPE.
The default length of the grid over which finding the optimal bandwidth is 20, which means that the bandwidths' grid is [0.1, 0.2, ..., 2].
This option returns the optimal bandwidth in the e-class object e(opt_band).

n_grid(#1,#2) allows to specify the length of the grid over which finding the optimal bandwidth.
The default values are (1,20), which means that the bandwidths' grid is [0.1, 0.2, ..., 2].

save_res(filename) allows to save the treated factual and counterfactual time patterns in filename.dta.

w_median specifies that the unique vector of synthetic weights is calculated by the yearly weights' median (the default uses the mean).

gr_y_name(name) allows to give a convenient name to the outcome variable to appear in the graphs.

gr_tick(#) allows to set the tick of the time in the time axis of the graphs.

gr1: allows to plot the the pre-treatment balancing and parallel trend graph.

gr2: allows to plot the overall treated/synthetic pattern comparison graph.

gr3: allows to plot the overall pattern of the difference between the treated and synthetic pattern graph.

save_gr1(graphname1) allows to save graph 1, i.e. the pre-treatment balancing and parallel trend.

save_gr2(graphname2) allows to save graph 2, i.e. the overall treated/synthetic pattern comparison.

save_gr3(graphname3) allows to save graph 3, i.e. the overall pattern of the difference between the treated and synthetic pattern.

kerneltype_options

kern
epan uses a Epanechnikov kernel

normal uses a Normal kernel

biweight uses a Biweight (or Quartic) kernel

uniform uses a Uniform kernel

triangular uses a Triangular kernel

tricube uses a Tricube kernel

npsynth returns the following objects:

e(bandh) is the bandwidth used within the selected kernel function.

e(RMSPE) is the Root Mean Squared Prediction Error of the estimated model.

e(W) is the vector of (kernel) weights.

Remarks

- The panel dataset must be perfectly balanced, and must not contain missing values.

- Please remember to use the update query command before running
this program to make sure you have an up-to-date version of Stata installed.

Example

. use Ita_exp_euro , clear
. tsset reporter year
. global xvars "ddva1 log_distw sum_rgdpna comlang contig"
. npsynth ddva1 $xvars , panel_var(reporter) time_var(year) ///
trperiod(2000) trunit(11) bandw(0.4) kern(triangular) gr1 gr2 gr3 ///
save_gr1(gr1) save_gr2(gr2) save_gr3(gr3) ///
gr_y_name("Domestic Direct Value Added Export (DDVA)") gr_tick(5)

References

Abadie, A., Diamond, A., and Hainmueller, J., 2010.
Synthetic Control Methods for Comparative Case Studies:
Estimating the Effect of California's Tobacco Control Program,
Journal of the American Statistical Association, 105, 490, 493-505.

Abadie, A., and Gardeazabal, J., 2003. The Economic Costs of Conflict:
A Case Study of the Basque Country, American Economic Review, 93, 1, 112-132.

Cerulli, G. 2015. Econometric Evaluation of Socio-Economic Programs: Theory and Applications,
Springer.

Cerulli, G., 2019. A flexible Synthetic Control Method for modeling policy evaluation, Economics Letters, 182, 40-44.

Author

Giovanni Cerulli

IRCrES-CNR

Research Institute on Sustainable Economic Growth, National Research Council of Italy

E-mail: giovanni.cerulli@ircres.cnr.it

Also see

Online: synth