Dear stalisters,

I am performing an event history analysis using a multinomial model (competing risk).

The failure event is low wage=0. I want to know if the individual exits to higher wage or to unemployment (in the first exit) or if the individual stays in constant lowwage for all years (hence three different outcomes).
Data still exists for the subsequent years after exiting, hence I cannot only recode outcome=0 if unemployment=1, I only want the outcome to be exit to unemployment if duration to that type of exit is shorter than to the other possible exit.

furthermore, as it is event history the id drops out after exiting, hence I want the outcome to occur on the right time when low wage is no longer 1.

When coding my outcome variable I end up in a very long and complicated code involving more than five different steps inclusing first event, durations, recoding to missing if something else is one, lagged variables etc. It is a mess. There must be a simpler way to do this.


Anyone that have any coding suggestions?

id year lowwage highwage unemp
1 2000 1 0 0
1 2001 0 1 0
1 2002 0 0 1
1 2003 1 0 0
2 2000 1 0 0
2 2001 1 0 0
2 2002 0 0 1
2 2003 1 0 0
3 2000 1 0 0
3 2001 1 0 0
3 2002 1 0 0
3 2003 0 0 1
best, Karin