Stata:合成控制法-synth-命令无法加载-plugin-的解决办法
(2020-07-24 19:32:59)分类: 内生性专题 |
原文链接:https://www.lianxh.cn/news/d7c94c7777226.html
目录
合成控制法的常用命令 synth
1. 第一种出现的报错
运行 synth
synthopt.plugin
use "smoking.dta",clear
xtset state year
synth cigsale lnincome age15to24 retprice beer(1984(1)1988) ///
cigsale(1988) cigsale(1980) cigsale(1975), ///
trunit(3) trperiod(1989) xperiod(1980(1)1988) ///
fig nested allopt
*===================== 出现下面报错信息 ======================*
Could not load plugin: D:\stata15/ado\plus\s\synthopt.plugin
(error occurred while loading synth.ado)
r(9999);
这是旧版本文件可能存在的问题,如果电脑里面装了多个版本的 synth 命令相关文件,可能会导致错误调用。
解决方案:
使用 ssc
install synth, replace
. ssc install synth, replace
*========================== 显示结果如下: ========================
the following files will be replaced:
D:\stata15/ado\plus\s\synth.sthlp
D:\stata15/ado\plus\s\synthopt.plugin
installing into D:\stata15/ado\plus\...
installation complete.