全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
1120 1
2012-10-21
有一些公司的合作事件及其发生时间。时间是在1990-2009。 有些公司可能有多起合作事件。
如何纪录 那些公司  在 3年内只有一次 合作事件。

For example,
Company A established a joint venture with Company B on Jan 5, 1991; (joint venture 1)
Company A estalbished another joint venture with Company C on Feb 9, 1993. (joint venture 2)
Company A established the third joint venture with COmpany D on Dec 5, 1994. (joint venture 3)
Company A establisehd the fourth joint venture with Company E on Dec 6, 2005 (joint venture 4)

Then I have to record the first and the fourth joint venture.
I should not record the second and the third one because the second one is within 3 years of the first one; and the third one is within 3 years of the second one.

How can I use the STATA command to record these two joint ventures?


二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2012-10-22 23:32:09

假设 date为时间变量,

sort firm date

bys firm: gen num_year=(date[_n-1]-date[_n])/365.5

gen jointcase=(num_year>3)

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群