Hi everyone!
I have another question relating to the data below (see attachment). I want to fill YearBought with 1994 if RE_total=REatcost and year==1994 and that for the whole gvkey. I am currently using the following code:
bys gvkey: replace YearBought = 1994 if year==1994 RE_total==REatCost & RE_total!=0 & YearBought==.
This code however, gives me the data below so it only reports the 1994 one time but it does not fill it in for the entire GVKEY (companycode)
Do you have any suggestions?
Many thanks
Rick
I have another question relating to the data below (see attachment). I want to fill YearBought with 1994 if RE_total=REatcost and year==1994 and that for the whole gvkey. I am currently using the following code:
bys gvkey: replace YearBought = 1994 if year==1994 RE_total==REatCost & RE_total!=0 & YearBought==.
This code however, gives me the data below so it only reports the 1994 one time but it does not fill it in for the entire GVKEY (companycode)
Do you have any suggestions?
Many thanks
Rick

Comment