| |
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: RE: coding for failure year
OK. I realize it is not Friday! I told you I was tired but I am now
answering my own question.
gen failure=0
replace failure=1 if orgnr[_n+1] != orgnr[_n]
note: to correct for those that did not fail and should be right
censored
note: failreas is variable that tells reason for firm failure
replace failure=0 if failreas==.
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Bradley,
Steven W
Sent: Thursday, March 23, 2006 3:04 PM
To: [email protected]
Subject: 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/
*
* 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/