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: sts graph: different results with -atrisk- vs -risktable- option
From
"Alex Gamma" <[email protected]>
To
<[email protected]>
Subject
st: sts graph: different results with -atrisk- vs -risktable- option
Date
Tue, 12 Apr 2011 14:49:59 +0200
Dear Statasticians,
I have multiple-record survival-time data and -stset- them as shown further
below. There are 30 records for each of 591 subjects.
My question: why do I get different numbers at risk with -sts
graph-'s -risktable- vs -atrisk- options?
With -sts graph, risktable name(risktable, replace)-, I get numbers at risk
192, 169, 102, 0 for analysis time 0, 10, 20, 30 years, respectively.
With -sts graph, atrisk name(atrisk, replace)-, I get numbers at risk
960, 382, 361, 338, 166, 328, 524, 232, 536 for the beginnings of each
interval.
I'm aware that the time points for which the numbers at risk are calculated
are not the same for the two options,
but what worries me is that -atrisk- produces numbers that are much higher
than the number of subjects in the analysis. In fact, for the first time
point, the number reported by -atrisk- (960) is exactly the 5-fold of that
reported by risktable- (192). The latter number is the right one, since it
corresponds to the total number of subjects in the analysis, as shown in the
results of -stset-.
I've searched the statalist archives, the Stata FAQ, the Stata manual entry
for sts graph, and googled "Stata risktable atrisk", but I found nothing
that addressed this discrepancy.
Further below, I'm also including the results of -sts list-. Maybe
they help diagnose the problem.
Best regards,
Alex
. stset year, id(intnr) failure(de43fail==0) origin(de4==3)
enter(year==1979) if(!missing(de43nosx3yv))
id: intnr
failure event: de43fail == 0
obs. time interval: (year[_n-1], year]
enter on or after: year==1979
exit on or before: failure
t for analysis: (time-origin)
origin: de4==3
if: !missing(de43nosx3yv)
------------------------------------------------------------------------------
17730 total obs.
11814 ignored per request (if(), etc.)
1744 obs. end on or before origin()
165 obs. begin on or after (first) failure
------------------------------------------------------------------------------
4007 obs. remaining, representing
192 subjects
67 failures in single failure-per-subject data
4007 total analysis time at risk, at risk from t = 0
earliest observed entry t = 0
last observed exit t = 29
. sts list
failure _d: de43fail == 0
analysis time _t: (year-origin)
origin: de4==3
enter on or after: year==1979
id: intnr
Beg. Net Survivor
Time Total Fail Lost Function
------------------------------------------
5 192 1 0 0.9948
7 191 1 0 0.9896
9 190 4 17 0.9688
11 169 3 0 0.9516
12 166 2 0 0.9401
14 164 1 0 0.9344
15 163 10 22 0.8770
18 131 1 0 0.8703
20 130 9 20 0.8101
22 101 12 18 0.7138
27 71 14 17 0.5731
29 40 9 31 0.4441
------------------------------------------
--
Alex Gamma Ph.D.
University Hospital of Psychiatry
Research Department
Lenggstr. 31
8032 Zurich
Switzerland
Tel: +4144 384 2621
Fax: +4144 384 2446
e-mail: [email protected]
--
Alex Gamma Ph.D.
University Hospital of Psychiatry
Research Department
Lenggstr. 31
8032 Zurich
Switzerland
Tel: +4144 384 2621
Fax: +4144 384 2446
e-mail: [email protected]
*
* 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/