***************************************************************** * KALBFLEISCH-PRENTICE 95% CI INTERVALS FOR SURVIVAL CURVES * ***************************************************************** * Kalbfleisch JD and Prentice RL(1980). The Statistical * * Analysis of Failure Time Data. New York: John Wiley & Sons * ***************************************************************** * (c) Marta Garcia-Granero (june 2005 - original code) modified * * (turnt into macro) september 2008. mgarciagranero@gmail.com * ***************************************************************** * Downloaded from: http://gjyp.nl/marta/ * * Feel free to use or modify this code, but * * acknowledge the author and the web site * *********************************************** * Unlike Greenwood's, the Kalbfleisch–Prentice approach has the attractive property that the upper and lower bounds are always between 0 and 1. * MACRO definition *. DEFINE KPSURVIVAL(!POS=!TOKENS(1)/!POS=!CHAREND('(')/!POS=!CHAREND(')')). * Creating the chart template *. PRESERVE. SET RESULTS=NONE MESSAGES=NONE ERRORS=NONE. HOST COMMAND=['IF not exist C:\Temp MD C:\Temp']. HOST COMMAND=['DEL C:\Temp\*.sgt']. RESTORE. DO IF $casenum EQ 1. WRITE OUTFILE='C:\Temp\KPTemplate.sgt' /'' /'