合成控制法:不可不知的命令synth、synth2、synth

您所在的位置:网站首页 合成控制法数据怎么找 合成控制法:不可不知的命令synth、synth2、synth

合成控制法:不可不知的命令synth、synth2、synth

2024-05-25 23:14| 来源: 网络整理| 查看: 265

图1显示了从1970年到2000年加州和美国其他地区每年香烟销售的变化。可以看出,在99号提案之后,香烟的销量下降了,但由于他们已经在下降,所以不清楚是否有任何影响——特别是因为全国其他地区的香烟销量同时也在下降。

然而,使用他们的方法,他们选择了一组最优的权重,当应用到全国其他地区时,产生如图2所示的图。注意,在处理前,这组权值产生的加州的时间路径与真实的加州本身几乎相同,但在处理后,这两个系列出现了分歧。乍一看,该计划似乎对香烟销售产生了影响。

加州香烟销售vs合成加州

图2:加州香烟销售vs合成香烟销售

表1列出了他们用于最小化距离的变量。请注意,这种分析产生了治疗组和对照组的值,便于对平衡进行简单的调查。这不是一个技术测试,因为每个治疗类别的每个变量只有一个值,但这是我们使用这种方法所能做的最好的。看起来两组中用于匹配的变量是相似的,特别是滞后的值。

表1: Balance table

变量 实际加州 合成加州 平均38个控制州 Ln(人均GDP) 10.08 9.86 9.86 15 - 24岁 17.40 17.40 17.29 零售价格 89.42 89.41 87.27 人均啤酒消费量 24.28 24.20 23.75 1988年人均卷烟销量 90.10 91.62 114.20 1980年人均香烟销量 120.20 120.43 136.58 1975年人均卷烟销量 127.10 126.99 132.81

除香烟销量量的滞后变量外,所有变量均为1980-1988年期间的平均值。啤酒的平均消费量是1984-1988年。

图3:处理前后估计的香烟销售差距

3、安慰剂检验

但到目前为止,我们只涉及到估计。我们如何确定两个系列之间观察到的差异是否具有统计学意义的差异?毕竟,我们每年只有两次观测。也许两个系列之间的分歧只不过是预测误差,任何选择的模型都会这样做,即使没有治疗效果。Abadie, Diamond和Hainmueller(2010)建议我们使用一种老式的方法来构建基于R. A. Fisher(1935)的精确的(p)值。Firpo和Possebom(2018)将本检验中使用的零假设称为“无论如何都没有治疗效果”,这是文献中最常见的零假设。尽管他们提出了一个替代的null用于推理,但我将重点关注Abadie、Diamond和Hainmueller(2010)在这个练习中提出的原始假设。如前一章所讨论的,随机化推理将处理分配给每个未处理的单元,重新计算模型的关键系数,并将它们收集到一个分布中,然后用于推理。Abadie、Diamond和Hainmueller(2010)建议计算一组处理前后的均方根预测误差(RMSPE)值,作为用于推断的检验统计量。我们的做法如下:

对donor pool中的每个国家/州反复应用综合控制方法,获得安慰剂效应的分布。

计算每个安慰剂治疗前的RMSPE: 公式为:

计算每个安慰剂在治疗后时期的RMSPE(类似的公式,但在治疗后时期)。

计算处理后和处理前的RMSPE的比率。

按从大到大的降序排序。

计算处理单元在分布中的比例为

对donor pool中的每个国家/州反复应用综合控制方法,获得安慰剂效应的分布。

计算每个安慰剂治疗前的RMSPE: 公式为:

计算每个安慰剂在治疗后时期的RMSPE(类似的公式,但在治疗后时期)。

计算处理后和处理前的RMSPE的比率。

按从大到大的降序排序。

计算处理单元在分布中的比例为

换句话说,我们想知道的是加州的治疗效果是否极端,这是一个相对的概念,与donor pool

自身的安慰剂比例相比。

有几种不同的方式来表示它。第一种方法是使用Stata双向命令将所有安慰剂覆盖在加州,我稍后将展示这一点。图4显示了它的样子。我想你们也会同意,它讲述了一个很好的故事。显然,加州处于一些治疗效果分布的尾部。

图4:使用所有单位作为供体池的安慰剂分布

Abadie, Diamond和Hainmueller(2010)建议反复删除那些前处理RMSPE与加州相当不同的州,因为正如你所看到的,它们在某种程度上扩大了规模,使人们很难看到发生了什么。它们通过几个步骤来实现这一点,但我将直接跳到最后一步(图5)。在这张图中,他们去掉了任何一个预处理后的RMSPE超过加州两倍的州单位。因此,这就限制了图片的范围,只有模型匹配的单元,预处理的,非常好,就像加州的。

图5:Pre-Proposition 99 RMSPE 2 times Pre-Pop 99 RMSPE for CA

但是,最终,推断是基于那些精确的(p)-值。所以我们这样做的方法是我们简单地创建一个比率的直方图,或多或少地在分布中标记治疗组,以便读者可以看到与模型相关的确切的(p)值。我在图6中生成它。

可以看出,加州在38个州中排名第一这给出了一个精确的(p)-值0.026,这小于大多数期刊想要(任意)看到的统计显著性的常规5%。

图6:所有单位前/后RMSPE的直方图。

合成控制法命令大全:synth、synth_runner、npsynth、allsynth、fect 1、命令:synth

一文读懂合成控制法 (Synthetic Control Method)操作及Stata应用

下载安装方法为:ssc install synth, replace

推荐文章:

Abadie, A., Diamond, A., and J. Hainmueller. 2014. Comparative Politics and the Synthetic Control Method. American Journal of Political Science (Forthcoming 2014).

Abadie, A., Diamond, A., and J. Hainmueller. 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. Economic Costs of Conflict: A Case Study of the Basque Country. American Economic Review 93(1): 113-132.

Vanderbei, R.J. 1999. LOQO: An interior point code for quadratic programming. Optimization Methods and Software 11: 451-484.

Abadie, A., Diamond, A., and J. Hainmueller. 2014. Comparative Politics and the Synthetic Control Method. American Journal of Political Science (Forthcoming 2014).

Abadie, A., Diamond, A., and J. Hainmueller. 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. Economic Costs of Conflict: A Case Study of the Basque Country. American Economic Review 93(1): 113-132.

Vanderbei, R.J. 1999. LOQO: An interior point code for quadratic programming. Optimization Methods and Software 11: 451-484.

一文读懂合成控制法synth_runner操作及应用

下载安装方法为:ssc install syntn_runner, replace

推荐阅读:

Cavallo, E., S. Galiani, I. Noy, and J. Pantano. 2013. Catastrophic natural disasters and economic growth. Review of Economics and Statistics 95: 1549-1561.

Quistorff, B. and S. Galiani. 2017. The synth_runner package: Utilities to automate synthetic control estimation using synth. Stata Journal 17: 834-849.

Cavallo, E., S. Galiani, I. Noy, and J. Pantano. 2013. Catastrophic natural disasters and economic growth. Review of Economics and Statistics 95: 1549-1561.

Quistorff, B. and S. Galiani. 2017. The synth_runner package: Utilities to automate synthetic control estimation using synth. Stata Journal 17: 834-849.

合成控制法(Nonparametric Synthetic Control Method,npsynth)及stata操作(一)

下载安装方法为:ssc install npsyntn, replace

参考文献

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.

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.

synth与synth_runner命令之后合成控制法最新推荐:allsynth操作与应用

下载安装方法为:ssc install allsyntn, replace

Author:Justin C. Wiltshire, [email protected],University of California, Davis

Acknowledgement: In addition to directly utilizing the synth package, the code for allsynth draws unapologetically on Jens Hainmueller's code from the original synth package. This is an explicit acknowledgement of that fac

参考文献

Abadie, A. and G.W. Imbens, 2011. Bias-Corrected Matching Estimators for Average Treatment Effects. Journal of Business & Economic Statistics, 29(1): 1-11.

Abadie, A., and J. L'Hour, 2019. A Penalized Synthetic Control Estimator for Disaggregated Data. Working paper.

Abadie, A., Diamond, A., and J. Hainmueller, 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., Diamond, A. and J. Hainmueller, 2015. Comparative politics and the synthetic control method. American Journal of Political Science, 59(2): 495-510.

Ben-Michael, E., Feller, A. and J. Rothstein, 2021. The Augmented Synthetic Control Method. Journal of the American Statistical Association, Forthcoming.

Wiltshire, J.C., 2021. Walmart Supercenters and Monopsony Power: How a Large, Low-Wage Employer Impacts Local Labor Markets. Working paper.

Abadie, A. and G.W. Imbens, 2011. Bias-Corrected Matching Estimators for Average Treatment Effects. Journal of Business & Economic Statistics, 29(1): 1-11.

Abadie, A., and J. L'Hour, 2019. A Penalized Synthetic Control Estimator for Disaggregated Data. Working paper.

Abadie, A., Diamond, A., and J. Hainmueller, 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., Diamond, A. and J. Hainmueller, 2015. Comparative politics and the synthetic control method. American Journal of Political Science, 59(2): 495-510.

Ben-Michael, E., Feller, A. and J. Rothstein, 2021. The Augmented Synthetic Control Method. Journal of the American Statistical Association, Forthcoming.

Wiltshire, J.C., 2021. Walmart Supercenters and Monopsony Power: How a Large, Low-Wage Employer Impacts Local Labor Markets. Working paper.

下载安装方法为:

cap ado uninstall fect net install fect, from(https://raw.githubusercontent.com/xuyiqing/fect_stata/master/) replace

主页:https://yiqingxu.org/packages/fect/stata/fect_md.html

Authors: Licheng Liu (MIT); Ye Wang (NYU); Yiqing Xu(Stanford); Ziyi Liu(PKU)

Package: fect

Main Reference: A Practical Guide to Counterfactual Estimators for Causal Inference with Time-Series Cross-Sectional Data

6、synth2

推荐阅读:

重磅--合成控制法新命令--synth2

合成控制法(SCM)安慰剂检验及可视化操作(synth2) 返回搜狐,查看更多



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3