Hi All,

I need to create a transition graph or matrices to show the percentage of households/ individuals who experienced job loss or some other income shocks for each year but I am not sure how to do it. I would appreciate any help. Here is a dataex from my data:

Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input long id float(jobloss year)
 1 0 1
 1 0 2
 1 0 3
 2 0 1
 2 0 3
 3 0 1
 3 0 2
 4 0 1
 4 0 2
 5 0 1
 5 0 2
 5 0 3
 6 1 1
 6 0 2
 6 1 3
 7 0 1
 8 0 2
 9 0 1
 9 0 2
 9 0 3
10 0 1
10 0 2
10 0 3
11 0 1
11 0 2
11 0 3
12 0 1
13 0 1
13 0 2
13 0 3
14 0 1
14 1 2
14 0 3
15 0 1
15 0 2
15 0 3
16 0 2
17 0 1
17 0 2
17 0 3
18 0 1
18 0 2
18 0 3
19 0 1
19 0 2
19 0 3
20 1 2
20 1 3
21 0 3
22 0 1
22 1 2
22 1 3
23 0 1
23 0 2
23 0 3
24 0 1
24 0 2
25 0 1
25 0 2
25 0 3
26 0 1
26 0 2
26 0 3
27 0 1
27 0 2
27 1 3
28 0 1
28 0 3
29 0 2
29 0 3
30 0 1
30 1 2
30 0 3
31 0 1
31 1 2
31 1 3
32 0 1
32 0 2
32 0 3
33 0 1
33 0 2
33 0 3
34 1 1
34 1 2
34 0 3
35 0 1
35 0 2
35 0 3
36 0 1
36 1 2
36 0 3
37 0 1
37 0 2
37 0 3
38 0 1
38 1 2
38 1 3
39 0 1
39 0 2
39 0 3
end
label values id id
label def id 1 "140100007", modify
label def id 2 "140100011", modify
label def id 3 "140100035", modify
label def id 4 "140100038", modify
label def id 5 "140100041", modify
label def id 6 "140100047", modify
label def id 7 "140100048", modify
label def id 8 "140100055", modify
label def id 9 "140100072", modify
label def id 10 "140100079", modify
label def id 11 "140100081", modify
label def id 12 "140100090", modify
label def id 13 "140100108", modify
label def id 14 "140100116", modify
label def id 15 "140100125", modify
label def id 16 "140100127", modify
label def id 17 "140100143", modify
label def id 18 "140100144", modify
label def id 19 "140100156", modify
label def id 20 "140100160", modify
label def id 21 "140100171", modify
label def id 22 "140100175", modify
label def id 23 "140100183", modify
label def id 24 "140100219", modify
label def id 25 "140100236", modify
label def id 26 "140100244", modify
label def id 27 "140100260", modify
label def id 28 "140100288", modify
label def id 29 "140100295", modify
label def id 30 "140100299", modify
label def id 31 "140100300", modify
label def id 32 "140100307", modify
label def id 33 "140100310", modify
label def id 34 "140100317", modify
label def id 35 "140100324", modify
label def id 36 "140100329", modify
label def id 37 "140100333", modify
label def id 38 "140100335", modify
label def id 39 "140100358", modify
------------------ copy up to and including the previous line ------------------

Listed 100 out of 18094 observations
Use the count() option to list more