Hello everybody.

I want to track when a group of individuals changes from one employer to another due to privatization, ultimately testing how privatization affects the group by comparing them to a control group. I know when a change occurs (the year and the month) and the involved employers. I have a numeric ID-variable, a numeric EMPLOYER-variable, a YEAR-variable, a MONTH-variable, background variables, and many outcomes. The dataset is in a long format. Let me describe my issue with the following example:

A group of employees changes from employer “100” to employer “200” on Jan 1, 2014. Such a dataset, containing only individuals involved in a particular case of privatization (i.e., only employees who have employer 100 or 200 in 2013 or 2014), would have around 400.000 observations.

I have tried different things like collapsing the dataset by ID and EMPLOYER, followed by duplicating the observations. This approach allows me to count the number of months an individual has an employer in 2013 and 2014. However, I do not know whether the employees shift from 100 to 200 or the other way around. I could browse all the remaining observations and assess them separately, but that is error-prone and time-consuming.

I know that there are many helpful Stata commands for longitudinal data analysis, but not precisely how to deal with this issue. Any help will be great!