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]

Re: st:transition from unemployment


From   Nick Cox <[email protected]>
To   [email protected]
Subject   Re: st:transition from unemployment
Date   Sat, 21 Apr 2012 17:12:17 +0100

I think Katya meant to say

by persid (year) :

but I am not clear that her answer is what is wanted.

Like Katya, I am also guessing what the data look like exactly . But
if the problem were this

0. unemployment is a string variable, with values like "unemp"

1. every person has an identifier

2. every person is observed at several times

3. every person starts out unemployed

4. we want the first time the status is not unemployed

then one answer is

bysort persid : egen firsttime = min(time / (status != "unemp"))

Nick



2012/4/21 Katya Galactionova <[email protected]>:
> presumably you have some sort of a person level identifier, say:
> PERSID, then what you want could be accomplished by creating dummies
> for each transition scenario:
>
> foreach s in emp olf unemp {
>         by persid year, sort: gen `s'=(status[_n+1]=="`s'")
> }
>
> Note: this will work if in your base year (2002) all records are unemployed.
>
> see more:
> Cox N. "Speaking Stata: How to move step by: step." The Stata Journal
> (2002). 2(1):86-102
> http://www.stata-journal.com/sjpdf.html?articlenum=pr0004
>
> Cheers!
>
>
> 2012/4/21 Мещеряков Антон <[email protected]>:
>> Dear STATA users,
>>
>> I would like to define status transitions from unemployment to employment, unemployment to olf, unemployment to unempl during two years.
>>
>> In 2002 the respondents are unemployed, but in 2003 they may change they status becoming empl or olf, however, they may also stay at unemployment.
>>
>> Data looks like (status change for one respondent during two years):
>>
>> status                  year
>> unemp                 2002
>> unemp                 2002
>> emp                     2003
>> emp                     2003
>> unemp                 2002
>> emp                     2003
>> olf                        2003
>> unemp                 2002
>> unemp                 2002
>> unemp                 2003
>> olf                        2003
>> unemp                 2002
>> emp                     2003
>> olf                        2003
>>
>> I need to identify and fix the quantity of the FIRST status change: transition from unemployment(2002) to status(emp, olf or unemp) in 2003.
>> Could you please help if you have ideas how to do it right?

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index