Dear Stata Users,
Im using a microdata set. Im estimating aggregates with the data set. The data set is unbalanced. A situation arises when I lag the variables by
sort PLANT YEAR STATE COUNTY ECOGROUP FIRM
quietly by PLANT: gen Ait1= aggregateprod[_n-1]
It generates missing values for the lag variable of the aggregate, but there should a value(with the exception of the first year), since Ait is the aggregate value by year. How can I change the missing values to the actual values without doing a replace for each year. I thank you in advance for all your help.
Sincerely,
Luis
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/