Dear Statalist:
May I ask for help from stata experts?
I have a hospital data with patient ID (hrn), separation dates (sep_date) and
discharge status (dis_sta2, for those deceased coded as 1 others as 0).
The causes of admission in the data are classified as either CHD (cond=1) or
other (cond=0). The data contains at least one CHD admission for each patient.
There are 5882 subjects with 21299 admissions.
I am trying to analyse the survival of patients with CHD, using the following
statement. I came across the following problems.
1. The result shows that only 2519 subjects are left, originally there are 5882.
2. 'Stsum' doesn't show me the survival time at 25%, 50% and 75%.
Could anyone tell me why?
Cheers
Jiqiong
. stset sep_date, id(hrn) origin(cond=1) failure (dis_sta2=1)
id: hrn
failure event: dis_sta2 == 1
obs. time interval: (sep_date[_n-1], sep_date]
exit on or before: failure
t for analysis: (time-origin)
origin: cond==1
------------------------------------------------------------------------------
21299 total obs.
9839 obs. end on or before enter()
2062 obs. begin on or after (first) failure
------------------------------------------------------------------------------
9398 obs. remaining, representing
2519 subjects
0 failures in single failure-per-subject data
2360408 total analysis time at risk, at risk from t = 0
earliest observed entry t = 0
last observed exit t = 3561
. stsum
failure _d: dis_sta2 == 1
analysis time _t: (sep_date-origin)
origin: cond==1
id: hrn
| incidence no. of |------ Survival time -----|
| time at risk rate subjects 25% 50% 75%
---------+---------------------------------------------------------------------
total | 2360408 0 2519 . . .
. qui sort hrn sep_date
. qui by hrn: gen n=_n
. qui by hrn: gen N=_N
. sum one if n==1
Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
one | 5882 1.984189 1.846311 1 16
*
* 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/