year code ownership
2004 9 0
2005 9 1
2006 9 1
2007 9 1
2004 12 0
2004 16 0
2005 16 0
2006 16 0
2007 16 0
如上的平衡面板,其中xtset code year
Ownership 代表所有制性质。我想把这期间所有制性质发生改变的unit删除,即上面数据中的code=9.如何实现,及其 推广。谢谢。这也是面板中涉及到制度分析中的一个常见问题。大家讨论之。
请注明:姓名-公司-职位
以便审核进群资格,未注明则拒绝
bys code: egen mi=min(ownership)
bys code: egen ma=max(ownership)
keep if mi==ma
bys code: egen sd=sd(ownership)
keep if sd==0
*这个可以省一步
many thanks ,so brilliant you are !!
I learn a skil ,well ,accumulate day by day and you will achieve a lot .Thanks for the platform.