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