Hello,

I am interested in assigning a treatment to a firm if it was domestic (foreign=0) in year 2003 and foreign (foreign=1) in 2004. All firms for wich this criterion holds should be counted as treated (for alle years). However, a problem is the fact that this implies that each firm has to be evaluated on two consecutive rows. A further problem is that firms are not always available for all of this years. I am not having an idea how to approach.
Further the dataset contained 35000 firms s.t. it is impossible to go through it by hand.

Thank you very much in advance.