[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

# st: Spell-data Problem

 From Joerg Eulenberger To statalist@hsphsun2.harvard.edu Subject st: Spell-data Problem Date Fri, 29 Aug 2008 10:31:22 +0200

Dear Statausers,
i have an Spell-dataset like in the Table. My Problem is there Gap's between the episode's.
For instance: Between the first and the second spell of Person 1002, are two months missing. (2005m10-2005m11).
I want to create an separate Spell for the Missing time, like the other spells, with a new status 9 and an time correct epiid.
For instance: after insert the new missing-spell, the missing Spell should have the epiid-number 2 and following spells 3 and 4.
Persnum is the ID of Person. xt is the state, like job or unemployed. xbrr is the begin of the spell, xerr is the end of spell and epiid is the id of spell by persnum.

| persnum xt xbrr xerr epiid |
|--------------------------------------------|
1. | 1001 3 2004m9 2005m12 1 |
2. | 1002 1 2004m7 2004m9 1 |
3. | 1002 2 2004m12 2005m7 2 |
4. | 1002 2 2005m8 2005m12 3 |
5. | 1005 3 2004m6 2004m8 1 |
6. | 1005 2 2004m9 2005m12 2 |
7. | 1007 1 2004m7 2004m7 1 |
8. | 1007 3 2004m8 2004m10 2 |
9. | 1007 1 2004m11 2004m12 3 |
10. | 1007 3 2005m1 2005m8 4 |
11. | 1007 2 2005m10 2005m12 5 |
12. | 1008 1 2004m9 2005m12 1 |
13. | 1010 1 2004m7 2004m8 1 |
14. | 1010 2 2004m9 2005m12 2 |

Thanks in advance!
Jörg
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/

 © Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index