Date: Thu, 8 May 2003 12:51:47 -0400
Reply-To: "Yampolskaya, Svetlana" <firstname.lastname@example.org>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: "Yampolskaya, Svetlana" <email@example.com>
Subject: Re: problems with survival analysis
Content-Type: text/plain; charset="iso-8859-1"
I have some problems with survival analysis, specifically, life tables, that
I cannot solve.
Here are the variables I have:
Subject id (SUBJID), the date when a subject entered services (RECDATE),
the last date of tracking subjects (LDATE), and 5 districts (DISTR).
Some of these subjects entered the services for the second time. Therefore,
I have cases with the same subjects' id but different time of entry.
Using life tables I am trying to calculate the percentage of subjects who
have the second episode of services by the end of 12th month.
Here is my syntax:
SORT CASES BY SUBJID RECDATE.
STRING L_SUBJID (A11).
COMPUTE L_SUBJID = LAG(SUBJID).
DO IF (L_SUBJID EQ SUBJID).
COMPUTE INTRTIME = CTIME.DAYS((RECDATE - LRECDATE)/30.44).
COMPUTE CENSOR = 1.
RECODE INTRTIME (0,SYSMIS=-999).
DO IF (INTRTIME EQ -999).
COMPUTE INTRTIME = CTIME.DAYS((LDATE - RECDATE) / 30.44).
COMPUTE CENSOR = 0.
VAL LAB CENSOR 0 'CENSORED' 1 'NOT' .
SURVIVAL TABLE = INTRTIME BY DISTR(1,5)
/INTERVAL=THRU 12 BY 1
The problem is that the percentages I get are at least twice as higher as
they should be (compared to % of uncensored cases obtained from the
I do know that percentages obtained from survival tables should a little bit
higher but I don't think what I get is right.