Dear community,
I have spell data on employment with the corresponding firm id if employed.
I have calculated the tenure duration over time (tenure_cum) and the total tenure duration in a firm (tenure_max) according to the rule I imposed, which is: consider spell of unemployment (with no firm id) as employment spell if the unemployment duration between 2 employment spells in the same firm ist < 6 months.
I now have the dataset of this form:
And would like to obtain this:
This refers to each firm id, keeping in mind that for the same firm id I can have different tenures for the same person over time.
Do you have any suggestions on this?
Thanks in advance.
I have spell data on employment with the corresponding firm id if employed.
I have calculated the tenure duration over time (tenure_cum) and the total tenure duration in a firm (tenure_max) according to the rule I imposed, which is: consider spell of unemployment (with no firm id) as employment spell if the unemployment duration between 2 employment spells in the same firm ist < 6 months.
I now have the dataset of this form:
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input long persnr int begepi long endepi float(spell duration employed same_firm tenure_cum tenure_max) 1 10768 10769 32 2 1 0 2 43 1 10856 10868 33 13 0 . . . 1 10869 10924 34 56 0 . . . 1 10932 10957 35 26 1 1 28 43 1 10958 10972 36 15 1 1 43 43 end format %d begepi format %d endepi
And would like to obtain this:
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input long persnr int begepi long endepi float(spell duration employed same_firm tenure_cum tenure_max) 1 10768 10769 32 2 1 0 2 43 1 10856 10868 33 13 0 1 . 43 1 10869 10924 34 56 0 1 . 43 1 10932 10957 35 26 1 1 28 43 1 10958 10972 36 15 1 1 43 43 end format %d begepi format %d endepi
Do you have any suggestions on this?
Thanks in advance.
Comment