Hi All,
I have very limited knowledge of stata, but the thing is that I have to finish my term paper very soon. I would greatly appreciate your reply to my post. I would like to ask you very simple questions. First, I want to generate a value and code it if the year is not consecutive. For example,
firmid year
1 1999
1 2000
1 2003
1 2004
As you can see, there is a gap between 2000 and 2003. Then, I want to generate one more value (gap) and code it 1 like:
firmid year gap
1 1999 1
1 2000 1
1 2003 1
1 2004 1
My second question is that I want to generate one more variable and code it 1 when an executive move to the other firm. For example,
firmid execuid
1000 1111
1000 1111
1100 1111
1100 1111
In this case, we can see that an executive (1111) moves from a firm (1000) to a firm (1100). Then I want to code like below.
firmid execuid move
1000 1111 1
1000 1111 1
1100 1111 1
1100 1111 1
I spent long time to do this, but I could not. Any reply to my question would be greatly appreciated.
Thank you.
Regards,
Andy
I have very limited knowledge of stata, but the thing is that I have to finish my term paper very soon. I would greatly appreciate your reply to my post. I would like to ask you very simple questions. First, I want to generate a value and code it if the year is not consecutive. For example,
firmid year
1 1999
1 2000
1 2003
1 2004
As you can see, there is a gap between 2000 and 2003. Then, I want to generate one more value (gap) and code it 1 like:
firmid year gap
1 1999 1
1 2000 1
1 2003 1
1 2004 1
My second question is that I want to generate one more variable and code it 1 when an executive move to the other firm. For example,
firmid execuid
1000 1111
1000 1111
1100 1111
1100 1111
In this case, we can see that an executive (1111) moves from a firm (1000) to a firm (1100). Then I want to code like below.
firmid execuid move
1000 1111 1
1000 1111 1
1100 1111 1
1100 1111 1
I spent long time to do this, but I could not. Any reply to my question would be greatly appreciated.
Thank you.
Regards,
Andy