SPELL_TO_PANEL, PANEL_TO_SPELL, SPELL_TO_SPELL, EVENT_TO_SPELL, and SPITTING_OVERLAPS
Spell, duration or event history data are used frequently in the social sciences. Handling this kind of data can be cumbersome, especially when you want to supplement spell data with panel data or vice versa. Alternatively, you might want to combine two spell files or enrich spell data with information on events while keeping the spell structure of your data. To accomplish these tasks, we provide five do-files to facilitate the data management.
(for an example see Table 1, Panel C)
(for an exampleTable 1, Panel D)
(for an example seeTable 2, Panel C)
(for an example seeTable 3, Panel C)
(for an example seeTable 4, Panel B)
When handling spell data it is furthermore necessary to take potential censoring into account. Censoring denotes that the beginning or ending of a spell is imprecise because of missing information or the beginning or ending of a spell is outside of the period of observation. However, in contrast to other written do files or ado files, all provided do-files guarantee correct censoring throughout the procedures. For instance, vocational training in the Table 4 (Panel A:) is “Left And Right Censored”. After splitting this spell one ends with first subspell that is left censored and the second subspell that is right censored.
The full documentation on how to use the do –files you will find here (PDF, 386.41 KB)
The do-files you will find here (ZIP, 296.8 KB)
A: Original spell data |
||||
begin |
end |
status |
spell nr |
censor |
[135] 1994 Mar |
[138] 1994 Jun |
[4] Vocational Training |
8 |
[1] Uncensored |
[146] 1995 Feb |
[149] 1995 May |
[4] Vocational Training |
9 |
[1] Uncensored |
[146] 1995 Feb |
[149] 1995 May |
[3] Part-Time Employment |
10 |
[4] Left Censored |
B: Original panel data |
|||
month of interview |
year of interview |
marital status |
branch of industry |
[3] March |
1994 |
[1] married |
[-2] Does not apply |
[4] April |
1995 |
[2] single |
[80] Education |
C: Collapsed spell data by enriching information from panel data |
||||||
begin |
end |
status |
spell nr |
marital status |
branch of industry |
censor |
[135] 1994 Mar |
[138] 1994 Jun |
[4] Vocational Training |
8 |
[1] Married |
[-2] Does not apply |
[1] Uncensored |
[146] 1995 Feb |
[147] 1995 Mar |
[4] Vocational Training |
9 |
|
[80] Education |
[1] Uncensored |
[146] 1995 Feb |
[147] 1995 Mar |
[3] Part-Time Employment |
10 |
|
[80] Education |
[4] Left Censored |
[148] 1995 Apr |
[149] 1995 May |
[4] Vocational Training |
9 |
[3] Single |
[80] Education |
[1] Uncensored |
[148] 1995 Apr |
[149] 1995 May |
[3] Part-Time Employment |
10 |
[3] Single |
[80] Education |
[1] Uncensored |
D: Generated panel data by enriching information from panel data |
|||||||
month of interview |
year of interview |
marital status |
branch of industry |
incidence_of_ |
incidence_of_ |
duration_of_ |
duration_of_ |
[3] March |
1994 |
[1] Married |
[-2] Does not apply |
|
|
|
|
[4] April |
1995 |
[3] Single |
[80] Education |
1 |
1 |
2 |
6 |
A: Original spell data (master file) |
||||
begin |
end |
status1 |
spell number |
censor |
[36] 1985 Dec |
[39] 1986 Mar |
[3] Part-Time Employment |
4 |
[4] left censored |
[36] 1985 Dec |
[39] 1986 Mar |
[4] Vocational Training |
2 |
[4] left censored |
[40] 1986 Apr |
[43] 1986 Jul |
[1] Full-Time Employment |
5 |
[5] right and left |
B: Original spell data (using file) |
||||
begin |
end |
status |
spell number |
censor |
[36] 1985 Dez |
[40] 1986 Apr |
[1] Single |
1 |
[2] left censored |
[41] 1986 Mai |
[44] 1986 Aug |
[2] Married |
2 |
[1] left censored |
C: Collapsed Spell data |
|||||||
begin |
end |
status of master file |
spell nr of master |
censor of master |
status of |
spell nr of using |
censor of using |
[36] 1985 Dec |
[40] 1986 Apr |
[3] Part-Time |
4 |
[4] left censored |
[1] Single |
1 |
[2] left censored |
[36] 1985 Dec |
[40] 1986 Apr |
[4] Vocational Training |
2 |
[4] left censored |
[1] Single |
1 |
[0] uncensored |
[40] 1986 Apr |
[41] 1986 May |
[1] Full-Time |
5 |
[4] left censored |
[1] Single |
1 |
[0] uncensored |
[41] 1986 May |
[44] 1986 Aug |
[1] Full-Time |
5 |
[2] right censored |
[2] Married |
2 |
[1] left censored |
[44] 1986 Aug |
[45] 1986 Sep |
. |
|
|
[2] Married |
2 |
[0] uncensored |
A: Original spell data |
||||
begin |
end |
status |
spell number |
censor |
[36] 1985 Dec |
[40] 1986 Apr |
[1] Single |
1 |
[0] Uncensored |
[41] 1986 May |
[44] 1986 Aug |
[2] Married |
2 |
[5] Right censored |
B: Event Data |
||
month of the birth |
year of birth |
gender of first child |
[2] February |
1986 |
[1] Male |
C: Spell data in compressed version |
|||||||
begin |
end |
status |
spell number |
censor |
event |
nr. of event |
gender of first child |
[36] 1985 Dec |
[37] 1986 Jan |
[1] Single |
1 |
[0] Uncensored |
0 |
0 |
. |
[38] 1986 Feb |
[40] 1986 Apr |
[1] Single |
1 |
[0] Uncensored |
1 |
1 |
[1] Male |
[41] 1986 May |
[44] 1986 Aug |
[2] Married |
2 |
[5] RZ: Last Spell |
0 |
1 |
. |
A: Original spell data |
||||
begin |
end |
status |
spell number |
censor |
[146] 1995 Feb |
[149] 1995 May |
[3] Part-Time Employment |
10 |
[2] Right Censored |
[147] 1995 Mar |
[152] 1995 Aug |
[4] Vocational Training |
9 |
[5] Left And Right Censored |
B: Split spell data with parallel subspells |
||||
begin |
end |
status |
spell number |
censor |
[146] 1995 Feb |
[146] 1995 Feb |
[3] Part-Time Employment |
10 |
[1] Uncensored |
[147] 1995 Mar |
[149] 1995 May |
[4] Vocational Training |
9 |
[4] Left Censored |
[147] 1995 Mar |
[149] 1995 May |
[3] Part-Time Employment |
10 |
[2] Right Censored |
[150] 1995 Jun |
[152] 1995 Aug |
[4] Vocational Training |
9 |
[2] Right Censored |