Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Adjusting overlapping spell data


From   Birte Tiedemann <[email protected]>
To   [email protected]
Subject   st: Adjusting overlapping spell data
Date   Wed, 31 Jul 2013 14:34:18 +0200

Hello everybody,

I am working on a panel data set (spell type) with overlapping data on times of employment (ym):

id spellnr begindate enddate period unemployed
1 1 2008m4 2008m9 6 0
1 2 2009m3 2009m8 6 1
1 3 2009m9 2010m9 13 0
1 4 2010m3 2011m3 13 0
1 5 2009m7 2010m9 15 1
1 6 2011m1 2011m6 6 0

Now I'm trying to summarize times of employment and unemployment for every id whi.e avoiding double counting due to overlappings. Also employment should be prioritised.

In the end the data is supposed to look like:
id spellnr begindate enddate period unemployed
1 1 2008m4 2008m9 6 0
1 2 2009m3 2009m8 6 1
1 3 2009m9 2010m9 13 0
1 4 2010m10 2011m3 6 0
1 6 2011m4 2011m6 3 0

I've no idea how to fix this in Stata. Hope you can help me. Thank you in advance.

Regards,
Birte

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index