Hello,
I have a dataset with spells on employment situations (spelltype) and the begin and end of these spells. The dates are in a monthly format, but counted from January 1983 onwards as 1,2,... For 2017 the months would be between 409 and 420.
I need to create dummies per year if the spell lasted at least 7 months in a certain year. I am unsure if there is any code that identifies time ranges.
I would appreciate any help!
I have a dataset with spells on employment situations (spelltype) and the begin and end of these spells. The dates are in a monthly format, but counted from January 1983 onwards as 1,2,... For 2017 the months would be between 409 and 420.
I need to create dummies per year if the spell lasted at least 7 months in a certain year. I am unsure if there is any code that identifies time ranges.
I would appreciate any help!
Code:
* Example generated by -dataex-. For more info, type help dataex clear input float(spelltyp begin end) 6 390 444 3 406 411 15 410 411 15 415 417 3 421 422 3 424 427 3 430 434 3 436 439 3 442 444 6 380 444 end label values spelltyp spelltyp label def spelltyp 3 "[3] (bis 04) teilzeit/geringfuegig; (ab 05) teilzeit", modify label def spelltyp 6 "[6] in Rente-Ruhestand", modify label def spelltyp 15 "[15] Minijob (bis 400 Euro)", modify label values begin begin label def begin 380 "[380] Aug 2014", modify label def begin 390 "[390] Jun 2015", modify label def begin 406 "[406] Okt 2016", modify label def begin 410 "[410] Feb 2017", modify label def begin 415 "[415] Jul 2017", modify label def begin 421 "[421] Jan 2018", modify label def begin 424 "[424] Apr 2018", modify label def begin 430 "[430] Okt 2018", modify label def begin 436 "[436] Apr 2019", modify label def begin 442 "[442] Okt 2019", modify label values end end label def end 411 "[411] Mar 2017", modify label def end 417 "[417] Sep 2017", modify label def end 422 "[422] Feb 2018", modify label def end 427 "[427] Jul 2018", modify label def end 434 "[434] Feb 2019", modify label def end 439 "[439] Jul 2019", modify label def end 444 "[444] Dez 2019", modify
Comment