Hi everyone,
My panel data seems like (part of):
gvkey datadate fyear at(total asset) equity ni (net income)
001010 30dec 1996 1996 100 100 100
001010 30dec 1997 1997 150 150 150
001013 30jun 1996 1996 ... ... ...
001013 30jun 1997 1997 ... ... ...
001034 30mar 1996 1996 ... ... ...
001034 30mar 1997 1997 ... ... ...
I have to calculate the change in equity and net income for the year 1997 and the data of 1996 is just to calculate and at the end I have to drop all of the observations of the year 1996. Firstly, I have to include firms with a sale >0 so I have use the code ''keep if sale > 0''. The problem is that some observations in 1997 are removed because of sales<0 while observations in 1996 are kept. I want to drop observations in 1996 if the observations in 1997 are not exist anymore but I don't know how to do that and with which code. Could someone help me to solve this problem? Thank you very much!
Kind regard,
Cindy Donald
My panel data seems like (part of):
gvkey datadate fyear at(total asset) equity ni (net income)
001010 30dec 1996 1996 100 100 100
001010 30dec 1997 1997 150 150 150
001013 30jun 1996 1996 ... ... ...
001013 30jun 1997 1997 ... ... ...
001034 30mar 1996 1996 ... ... ...
001034 30mar 1997 1997 ... ... ...
I have to calculate the change in equity and net income for the year 1997 and the data of 1996 is just to calculate and at the end I have to drop all of the observations of the year 1996. Firstly, I have to include firms with a sale >0 so I have use the code ''keep if sale > 0''. The problem is that some observations in 1997 are removed because of sales<0 while observations in 1996 are kept. I want to drop observations in 1996 if the observations in 1997 are not exist anymore but I don't know how to do that and with which code. Could someone help me to solve this problem? Thank you very much!
Kind regard,
Cindy Donald
Comment