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: R: Survival data - stset with and without enter() and exit () options
From
"Carlo Lazzaro" <[email protected]>
To
<[email protected]>
Subject
st: R: Survival data - stset with and without enter() and exit () options
Date
Sat, 3 Apr 2010 08:06:48 +0200
Dear abs stata,
I suppose that the cause of this seemingly odd behaviour can be tracked down
taking a look at the following excerpt of -help stset- (Stata 9.2/SE)
-------------------------------------------------------------------------
enter([varname==numlist] time exp) specifies when a subject first comes
under observation, meaning that any failures, were they to
occur, would be recorded in the data.
exit(failure | [varname==numlist] time exp) specifies the latest time
under which the subject is both under observation and at risk.
The emphasis is on latest; obviously subjects also exit the risk
pool when their data run out.
-------------------------------------------------------------------------
Just to top off what above, for more detail on yours and other topics abou
survival analysis, I would refer you to the following:
Cleves MA, Gould WW, Gutierrez R. An Introduction To Survival Analysis Using
Stata. Revised edition. College Station: StataPress, 2004.
Please note that an updated version of the same textbook has been published
in 2008.
HTH and Kind Regards,
Carlo
-----Messaggio originale-----
Da: [email protected]
[mailto:[email protected]] Per conto di asb stata
Inviato: sabato 3 aprile 2010 6.31
A: [email protected]
Oggetto: st: Survival data - stset with and without enter() and exit ()
options
I am declaring the data to be survival data using stset command with and
without enter() and exit() options. In one case the total analysis time at
risk is 5869 and in the other case it is 1426901. Can someone explain what
this difference implies? I am missing something fundamental here.
. stset year, id(uid) failure(devstat=1) enter(enyr) exit(mxyr)
id: uid
failure event: devstat == 1
obs. time interval: (year[_n-1], year]
enter on or after: time enyr
exit on or before: time mxyr
----------------------------------------------------------------------------
--
4535 total obs.
0 exclusions
----------------------------------------------------------------------------
--
4535 obs. remaining, representing
716 subjects
716 failures in single failure-per-subject data
5869 total analysis time at risk, at risk from t = 0
earliest observed entry t = 1960
last observed exit t = 2008
. stset year, id(uid) failure(devstat=1)
id: uid
failure event: devstat == 1
obs. time interval: (year[_n-1], year]
exit on or before: failure
----------------------------------------------------------------------------
--
4535 total obs.
0 exclusions
----------------------------------------------------------------------------
--
4535 obs. remaining, representing
716 subjects
716 failures in single failure-per-subject data
1426901 total analysis time at risk, at risk from t = 0
earliest observed entry t = 0
last observed exit t = 2008
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/