[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: coding for failure year
Statalisters,
A Friday (my brain is dead question).
I am trying to dummy code failure year.
I have repeated observations for companies and listed failures but the
reported failure year typically doesn't match the last year of company
data so I can't dummy code if year=failureyr. My data runs from 1994 to
2002 so most firms are right censored but I want to code a failure for
the last year of data for the firms that fail earlier than 2002.
orgnr year startyr failyr
21 1994 1994 2001
21 1995 1994 2001
25 1994 1994 1999
25 1995 1994 1999
25 1996 1994 1999
I was thinking about using the transition by organization number (orgnr)
Something like if orgnr(_n-1)!=orgnr(_n) then....
Thanks for your help,
Steve
*
* 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/