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]
st: Survival Analysis: stset-command
From
Philipp <[email protected]>
To
[email protected]
Subject
st: Survival Analysis: stset-command
Date
Sun, 27 Oct 2013 15:04:08 +0100 (CET)
Hi there,
I want to do a Survival Analysis but I have a problem using the stset-command. (Using Stata13.0/SE)
I want to look when households purchase real estate (ho=Home Ownership).
My panel data looks as follows:
id age year ho cens age_enter age_exit ...
1 32 2001 0 0 32 33
1 33 2002 0 1 32 33
2 27 2004 0 0 27 28
2 28 2005 1 0 27 28
3 45 2003 1 . 45 47
3 47 2005 1 . 45 47
...
I'm using:
drop if cens==.
stset age, failure(cens==1) id(id) enter(age_enter) exit(age_exit)
The Kaplan-Meier-Function goes from 1.00 to 0.00 for the full data set. But I want it to go to the probability of IDs without home (in the example .5). So there must be a (huge) mistake :/
Can someone help me please?
I'm not sure if my command is specific enough for Stata that it gets that I want only the age 28 of id 2 as "event".
Thanks for your help!
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/