Dear Statalist users

I am hoping you can solve a query I have

I want to look at pathways for young people aged between 15 and 30 in and out of various activities: Employment, FT; Employment PT; Unemployment; Not in the labour force; Home-making and study; and Study-only. I want to make comparisons between young people pre-Global Financial Crisis and young people post-Global Financial Crisis as well as comparisons between men and women. I'm thinking event-history analysis but I'm not quite sure how to go about it? I want to look at pathways (movements between the various activities) and maybe (although not necessarily) how long they stayed in the activities before moving.

If event history is indeed the right way to go about it - how would I make the required time duration variables?

I have longitudinal panel data spanning from 2001-2017.

Can anyone assist?

Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input float(activity GFC) byte sex
 3 0 2
10 0 2
10 0 2
10 1 2
10 1 2
 5 1 2
 5 1 2
12 1 2
12 1 2
 3 1 2
 1 1 2
 1 1 2
 1 0 2
 3 1 2
11 1 2
 1 1 2
10 1 2
11 1 2
 3 1 2
11 1 2
 3 1 2
10 1 2
10 1 2
10 0 2
10 0 2
 7 0 2
10 0 2
11 0 1
 1 0 1
 1 0 1
 1 0 1
 1 0 1
 1 0 1
 1 0 1
 1 1 1
 1 1 1
 1 1 1
 1 1 1
 1 1 1
 1 1 1
 1 1 1
 1 1 1
 1 0 1
 1 1 1
 1 1 1
 1 1 1
 1 1 1
 1 1 1
 1 1 1
 1 1 1
 1 1 1
 1 1 1
12 1 2
12 1 2
12 1 2
12 1 2
 5 1 2
 3 1 2
 3 0 2
11 0 2
12 1 2
 3 1 2
 3 1 2
 3 1 2
 3 1 2
10 1 2
10 1 2
10 1 2
10 1 2
 3 1 2
10 1 2
10 1 2
10 1 2
 3 1 2
 3 1 2
 3 1 2
 3 1 1
 3 1 1
 3 1 1
 3 1 1
 3 1 1
 1 0 1
 3 0 1
 1 0 1
 1 0 1
 1 0 1
 5 1 1
 1 1 1
 1 1 1
 1 1 1
 1 1 1
 1 1 1
 1 1 1
 1 1 1
 1 1 1
11 1 1
11 1 1
 1 1 1
 1 1 1
 1 1 1
end
label values activity activity
label def activity 1 "[1] Employed, full-time", modify
label def activity 3 "[3] Employed, part-time", modify
label def activity 5 "[5] Unemployed", modify
label def activity 7 "[7] Not in the labour force", modify
label def activity 10 "[10] Home-making / caring", modify
label def activity 11 "[11] Work and study", modify
label def activity 12 "[12] Study", modify
label values sex QSEX
label def QSEX 1 "[1] Male", modify
label def QSEX 2 "[2] Female", modify
best
Brendan