我的具体操作如下:
----这第一步是因为我在csdn上看到有博主说,如果改变了stata的默认安装位置,可能会导致命令安装失败,因此我按照其教程将路径都更改过了,与软件安装位置统一。
【使用命令】
sysdir set PLUS "D:\Software\Stata16\ado\plus"
sysdir set PERSONAL "D:\Software\Stata16\ado\personal"
sysdir set OLDPLACE "D:\Software\Stata16\ado\oldplace"
sysdir
【显示如下】
. sysdir
STATA: D:\Software\Stata16\
BASE: D:\Software\Stata16\ado\base\
SITE: D:\Software\Stata16\ado\site\
PLUS: D:\Software\Stata16\ado\plus\
PERSONAL: D:\Software\Stata16\ado\personal\
OLDPLACE: D:\Software\Stata16\ado\oldplace\
- 【接下来安装和使用csdid命令】
- ssc install csdid , replace
- ssc install drdid , replace
- ssc install event_plot , replace
- gen Action=policy_year //设置政策冲击时间
- replace Action=0 if Action==.
- xtset id year
- csdid lny did, ivar(id) time(year) gvar(Action) method(dripw)
. ssc install csdid , replace
checking csdid consistency and verifying not already installed...
all files already exist and are up to date.
.
. ssc install drdid , replace
checking drdid consistency and verifying not already installed...
all files already exist and are up to date.
.
. ssc install event_plot , replace
checking event_plot consistency and verifying not already installed...
all files already exist and are up to date.
. xtset id year.
. csdid lny did, ivar(id) time(year) gvar(Action) method(dripw)
command csdid lny did is unrecognized


雷达卡





京公网安备 11010802022788号







