Dear forum,
I have a dataset which looks like this
Company code year .....
123 2000
123 2001
244 2000
244 2001
355 2000
588 2000
588 2001
Now I want to regress my data. The regression should take all company data from 2001. If the company has only data for 2000, the regression should take 2000 (like the number 355 in my dataset). I do not have "missing data", I already cutted them out. So replacing missing values is not possible for me.
How can I do that?
My regression at the moment is like this:
reg car size if year==2001, robust
Related Posts with Take values of previous year if values for current period are not availabe
PANEL DATA and UNIT ROOT TESTDear Stata users, I am conducting my research about CHINESE FDI IN AFRICA, my main purpose of the s…
Problem with macro in forvaluesHi! I'm trying to construct the variables for exporter-time and importer-time fixed effects for our …
2SLS in non-linear models with count endogenous explanatory variableGreetings everyone, I specify two models in my study with two different dependent variables; one of…
Date formattingHello Statalist, I am working with dates and I am encountering a problem I have not encountered bef…
How to select a specific part in a string variable?Greetings, I am cleaning data in a very large dataset, and would want to drop all records in a speci…
Subscribe to:
Post Comments (Atom)
0 Response to Take values of previous year if values for current period are not availabe
Post a Comment