IBM Support

Can SPSS produce confidence intervals for the estimated survival function?

Troubleshooting


Problem

I'm running the Kaplan-Meier procedure in SPSS to obtain estimates of the cumulative survival function. I would like confidence intervals for the point estimates at each observed event time, but I don't see a way to request such intervals. Can SPSS produce these intervals?

Resolving The Problem

The KM procedure does not produce confidence intervals for the estimated survival function. One simple way to do this that is potentially useful in large samples is to rely on the asymptotic normality of the variance estimates and simply take the survival point estimates minus and plus so many times the standard errors. However, this approach has some major drawbacks. One is that it does not necessarily work well in small samples. The other is that it can produce interval bounds outside of the [0-1] interval.

According to Hosmer and Lemeshow (Applied Survival Analysis, 1999, Wiley), the most commonly produced confidence intervals are based on a transformation of intervals for the log-minus-log survival function, or log cumulative hazard function. Below are commands to produce these intervals in SPSS.

COMPUTE se_lml = SE_1/(SUR_1*SQRT((LN(SUR_1))**2)) .
COMPUTE lml_low = LN(HAZ_1) - IDF.NORMAL(1-.05/2,0,1)*se_lml.
COMPUTE lml_upp = LN(HAZ_1) + IDF.NORMAL(1-.05/2,0,1)*se_lml.
COMPUTE sur_low = EXP(-EXP(lml_upp)).
COMPUTE sur_upp = EXP(-EXP(lml_low)).
EXECUTE .

These commands assume that you have saved the survival function estimates, their standard errors and the cumulative hazard function with their default names (SUR_1, SE_1 and HAZ_1, respectively). Change these names if you have different names. If you wish to have coverage other than 95%, replace the .05 in the IDF.NORMAL functions with your desired alpha level. The confidence interval bounds will be available for viewing in the data file, and can be listed out using a LIST command or via Case Summaries (SUMMARIZE).

Note that unless the last event time is censored, the estimated survival function goes to 0, in which case the CI bounds are undefined. In that case, you'll receive the following warnings for each case with a 0 estimated survival function:

>Warning # 602
>The argument for the natural log function is less than or equal to zero.
>The result has been set to the system-missing value.

>Warning # 511
>A division by zero has been attempted on the indicated command. The result
>has been set to the system-missing value.

These warnings can be ignored.

[{"Product":{"code":"SSLVMB","label":"IBM SPSS Statistics"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Not Applicable","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"Not Applicable","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Historical Number

57454

Document Information

Modified date:
16 April 2020

UID

swg21476386