01-07-2015 11:08 AM
Is there a SAS option to compare Kaplan-Meier estimates? I have a strata variable defined at 2 levels and would like to compare the KM survival estimates at a specific time point (5 years, in my case), e.g. strata level 1 KM 5-year estimate vs. strata level 2 KM 5-year estimate. Is it possible to do this in SAS PROC LIFETEST or elsewhere? A p-value or, even better, the confidence interval of the difference would be great.
01-07-2015 01:09 PM
In case that you have no censoring, then the easiest way is to create a binary variale indicating whether or not the persone has event before the time of interest (t=5 in your case). Then make a logistic regression to see if there is association between this binary variable and your strata variable.
If there is censoring then it becomes more complicated. I dont think there is any procedure that can do it for you, so you have to construct the test yourself. I suggest to test the cumulated incidence functions eqaul at the t=5. This is equivalent to test equal KM-curves, but has better asymptotic behaviour. PHREG can give you the cumulated incidencefunctions as well as the standard-errors.
do strata=1 to 2;
do i=1 to 10000;
proc phreg data=mydata;
baseline out=survival loglogs=loglogsurv cif=cif stderr=stderr stdcif=stdcif cumhaz=cumhaz stdcumhaz=stdcumhaz;
set survival(in=a where=(strata=1) rename=(cumhaz=cumhaz1 stdcumhaz=stdcumhaz1))
survival(in=b where=(strata=2) rename=(cumhaz=cumhaz2 stdcumhaz=stdcumhaz2));
retain laststdcumhaz1-laststdcumhaz2 lastcumhaz1 lastcumhaz2;
if a then do;
else if b then do;
format pointwise_pvalue 6.4;
keep t cumhaz1 cumhaz2 stdcumhaz1-stdcumhaz2 pointwise_zvalue pointwise_pvalue;
symbol i=join v=none;
proc gplot data=test;
*test at t=5;
set test(where=(t<5)) end=end;
01-08-2015 12:00 PM
Thank you JacobSimonsen. I was hoping SAS might have something available, but perhaps not. I currently do something similar to the approach you provided above (which is greatly appreciated, by the way) but a little different. I get the 5-year survival estimates and corresponding standard error, based on the log-log transformation, for each group from the outsurv option in PROC LIFETEST. Then conduct a simple z-test or build a confidence interval for the difference assuming a normal distribution.
I am replicating some results conducted by a previous statistician using the same data set. Everything matches nicely but the CI I obtain is slightly different. Given this, I started wondering if SAS had something more exact than the z-score method I am using. I will try yours when I have time to see how well it matches.