variable Description
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
id unit identifier
time time variable
y dependent variable
treated =1 for treated units; =0 for control (never-treated) units
treated_post =1 for all observations from treated units after policy intervention; =0 otherwise
x1, x2, ... other covariates
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
You must declare your data as panel data before using pcdid:
xtset id time
PCDID model with the number of factors determined automatically:
pcdid y treated treated_post x1 x2
以上是对PCDID命令的介绍。
我的命令是 pcdid y2 treatC did lnGDP lnPGDP
一开始怀疑是缺失数据的问题,将被解释变量y2的缺失值已经删除了,尝试了 pcdid y2 treatC did 依旧报错,有没有大神知道是什么原因呀?