Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Problems with stset


From   Stefan Englund <stefan.englund@sofi.su.se>
To   statalist@hsphsun2.harvard.edu
Subject   st: Problems with stset
Date   Wed, 26 Feb 2003 15:14:18 +0100

Dear Statalisters

I want to do a Survival analysis with multiple episodes and with time varying covariates. The data set looks something like the following

id year event x1 x2
1 1975 0 0,86 0,97
1 1976 0 0,11 0,97
1 1977 1 0,51 0,79
1 1978 0 0,62 0,88
etc . . . .
1 1990 0 0,75 0,85
1 1991 1 0,75 0,80
1 1992 0 0,73 0,82
etc . . . .
1 1995 0 0,80 0,85
2 1975 0 0,90 0,56
2 1976 1 0,80 0,64
2 1977 0 0,80 0,50
etc . . . .
2 1995 0 0,90 0,67
3 1975 0 0,45 0,91
etc . . . .
3 1980 1 0,93 0,70
3 1981 0 0,91 0,62
etc . . . .
3 1995 0 0,99 0,50
etc
etc
18 1995 0 0,33 0,21

The X:s are varying every year and the events are cuts in the unemployment benefit. The problem I have is to set the appropriate duration in stset. I want the spell to be from the year after the last cut up to the present cut. Am I totally wrong or can I do this using Stata? Can someone please help me?

thanks in advance


Stefan Englund
Swedish Institute for Social Research

*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




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