查看原文
其他

Stata: 合成控制法synth命令无法load plugin的解决方案

合成控制法的命令为synth,但是在最近使用过程中,经常偶尔出现报错,因此将常用解决方案展现如。

Synth for Stata

1. The code stops with an error message. What should I do?

Most problems can be solved by exactly repeating the following steps:
a) close your Stata and reopen it
b) type: "update all" (and if asked "update swap" to fully install newly updated executables)
c) type:
net from "https://web.stanford.edu/~jhain/Synth"
net install synth, all replace force
In most cases the code should run now.


1

ssc install synth, replace


合成控制法的Stata命令,Abadie et al. (2010)提供了合成控制法的Stata程序 synth,由于该命令是一个外部命令,因此可以重新下载。 


由于部分使用者直接将外部命令ado/plus下面的synth外部命令copy到自己的电脑上,因此经常会出现旧版本的问题,建议重新下载安装。


由于不同版本以及大家使用电脑上的旧命令文件可能不同,因此建议大家出现此类问题时,先尝试这个方法。


然后进行帮助文件查看,发现命令没有问题,但是若还出现报错,可以尝试第2种方法。


Before installing Synth, please make sure that your Stata is up to date (ie. type update all on the Stata command prompt). 

To install Synth for Stata type: 

ssc install synth, replace all



2

When installing the program using net install I get the following error message: Could not load plugin: c:\ado\plus\s\synthopt.plugin (error occurred while loading synth.ado) 


This means that a plugin is not availbale for your platform (see here details). In this case you can download the C code to compile the plugin on your platform here.


Synth for Stata runs on Stata versions 9-15 (32 and 64 bit), but contains a platform dependent plugin. Net install will automatically copy the correct version of the plugin to your computer. Currently, plugin versions are included for Windows platforms (XP, Vista, 7, 8) for 32 and 64 bit Stata, Mac platforms (OS X on x86-32, x86-64, PPC-32 and PPc-64) for Stata 32 or 64 bit, and Unix/Linux platforms for 32 and 64 bit Stata. If a plugin is not availbale for your platform, you will receive an error message during the installation. In this case you can download the C code to compile the plugin on your platform


下载网址为:https://web.stanford.edu/~jhain/synthplugin.zip

您可能也对以下帖子感兴趣

文章有问题?点此查看未经处理的缓存