The data is structured in the following format: we have 2 observations by id: the first one corresponds to the year/month the individual signed up for the program & the last one the year/month the individual droped out from the program.
I would like to transform the data so as to have 1 observation for each year/month in which the id was enrolled in the program.
Consider this simple data example:
Code:
clear input id year month A 2010 2 A 2010 7 B 1999 11 B 2000 3 end
Code:
clear input id year month A 2010 2 A 2010 3 A 2010 4 A 2010 5 A 2010 6 A 2010 7 B 1999 11 B 1999 12 B 2000 1 B 2000 2 B 2000 3 end
0 Response to Expanding data with start/end date to include all dates in between
Post a Comment