Can anyone tell me how can I do this using stata command?
I do appreciate your help.
hhid | month | employment status | months unemployed | dummy for months unemployed |
1 | January | 1 | 1 | 0 |
1 | February | 1 | 2 | 0 |
1 | March | 1 | 3 | 0 |
1 | April | 1 | 4 | 0 |
1 | May | 1 | 5 | 0 |
1 | June | 1 | 6 | 0 |
1 | July | 2 | 0 | 0 |
1 | August | 2 | 0 | 0 |
1 | September | 2 | 0 | 0 |
1 | October | 2 | 0 | 0 |
1 | November | 2 | 0 | 0 |
1 | December | 2 | 0 | 1 |
employment status: 1=unemployed |
2=employed |
0 Response to Generating a dummy variable with value from other variable to a new row (cell)
Post a Comment