Laerd Statistics LoginCookies & Privacy

Kaplan-Meier using SPSS Statistics

Introduction

The Kaplan-Meier method (Kaplan & Meier, 1958), also known as the "product-limit method", is a nonparametric method used to estimate the probability of survival past given time points (i.e., it calculates a survival distribution). Furthermore, the survival distributions of two or more groups of a between-subjects factor can be compared for equality.

For example, in a study on the effect of drug dose on cancer survival in rats, you could use the Kaplan-Meier method to understand the survival distribution (based on time until death) for rats receiving one of four different drug doses: "40 mg/m2/d", "80 mg/m2/d", "120 mg/m2/d" and "160 mg/m2/d" (i.e., the survival time variable would be "time to death" and the between-subjects factor would be "drug dose"). You could then compare the survival distributions (experiences) between the four doses to determine if they are equal. If they were not equal, you could further determine where any differences between the groups of the between-subjects factor lie (e.g., whether death rates were higher in rats given the lowest drug dose – "40 mg/m2/d" of the drug – compared to rats given the highest drug dose: "160 mg/m2/d"). Alternately, you could use the Kaplan-Meier method to determine whether the (distribution of) time to failure of a knee replacement differs based on exercise impact amongst young patients (i.e., the survival time would be "time to knee replacement failure" and the between-subjects factor would be "exercise impact", which has three groups: "sedentary", "low impact" and "high impact"). You could then compare the survival distributions (experiences) between the three levels of exercise impact to determine if they are equal, and if not, where any differences lie (e.g., whether time to knee replacement failure was lower in the "sedentary" exercise group compared to the "high impact" exercise group).

This "quick start" guide shows you how to carry out a Kaplan-Meier analysis using SPSS Statistics, as well as interpret and report the results from this analysis. However, before we introduce you to the SPSS Statistics procedure to perform a Kaplan-Meier analysis, you need to understand the different assumptions that you must meet in order to use the Kaplan-Meier method. We discuss these assumptions next.

SPSS Statistics

Assumptions

The Kaplan-Meier method has six assumptions that must be met. If these assumptions are not met, you cannot use the Kaplan-Meier method, but may be able to use another type of survival analysis instead. Therefore, before you can use the Kaplan-Meier method using SPSS Statistics, you need to check that you have met the following six assumptions:

If your study design does not meet these six assumptions, you might not be able to use the Kaplan-Meier method. If you would like to know more about the characteristics of the Kaplan-Meier method, including the null and alternative hypotheses it is testing, see our enhanced Kaplan-Meier guide. In the section, Test Procedure in SPSS Statistics, we show you how to analyse your data using the Kaplan-Meier method in SPSS Statistics. First, we introduce you to the example we use in this guide.

TAKE THE TOUR

SPSS Statistics

Example

A researcher wanted to determine the relative effectiveness of three types of intervention designed to help long-term smokers quit: a "hypnotherapy programme", wearing "nicotine patches" and the use of "e-cigarettes" (electronic cigarettes). More specifically, the researcher wanted to determine if and when smokers that had quit smoking after undertaking one of these three interventions started smoking again. Participants were observed for 2 years (104 weeks) after the interventions had taken place. A successful result would be where smokers did not start smoking again. Also, the longer the length of time it took before participants started smoking again, the more effective the intervention. For example, if participants that used the e-cigarettes largely started to smoke again towards the end of the second year, but those participants using nicotine patches started smoking again in the middle of the first year, the researcher could consider the e-cigarette intervention to be more effective. Therefore, the Kaplan-Meier method was used to help achieve two goals:

Therefore, the researcher recruited a sample of 150 participants to the study. These 150 participants were randomly divided into three independent groups of 50 participants, with 50 participants undergoing the hypnotherapy programme, another 50 participants using the nicotine patches and the final 50 using the e-cigarettes.

At the end of the three interventions (during the 2-year follow-up period), the researcher recorded whether a participant started smoking again, which was defined as the "event". If the participant did not start smoking again or dropped out of the study, the researcher recorded this participant as being "censored". These two options – an "event" or being "censored" – reflect the two categories of the event status variable, which we have simply called status. The time until a participant either reaches the "event" or is "censored" is called the survival time and is measured in the variable, time. This time could be from 0 weeks (i.e., immediately after a participant finishes the intervention) through to 104 weeks (i.e., 2 years after the intervention when the researcher decided to determine the relative success of the three interventions).

SPSS Statistics

Setup in SPSS Statistics

For a Kaplan-Meier survival analysis, you will have at least four variables. In this example, these are:

If you are unsure how to correctly enter these variables into the Variable View and Data View of SPSS Statistics so that you can carry out your analysis, we show you how to do this in our enhanced Kaplan-Meier guide. You can learn about our enhanced data setup content in general here or subscribe to the site here to access our enhanced Kaplan-Meier guide.

SPSS Statistics

Test Procedure in SPSS Statistics

The 13 steps below show you how to analyse your data using the Kaplan-Meier method in SPSS Statistics to determine whether there are statistically significant differences in the survival distributions between the groups of your between-subjects factor using the log rank test, Breslow test and Tarone-Ware test. At the end of these 13 steps, we show you how to interpret the results from this test.

Now that you have run the Kaplan-Meier procedure, we show you how to interpret and report your results.

Join the 10,000s of students, academics and professionals who rely on Laerd Statistics. TAKE THE TOUR
SPSS Statistics

Output from using the Kaplan-Meier method in SPSS Statistics

SPSS Statistics generates quite a lot of output for the Kaplan-Meier method: the Survival Functions and Censoring plots, and a number of tables: the Means and Medians for Survival Time, Case Processing Summary and Overall Comparisons tables. If you have statistically significant differences between the survival functions, you will also need to interpret the Pairwise Comparisons table, allowing you to determine where the differences between your groups lie. In the sections below, we focus on the Overall Comparisons table, as well as touching on the Survival Functions plot.

Note: If you are unsure how to interpret and report the descriptive statistics from the Mean and Medians for Survival Time table, or the the percentages from the Case Processing Summary table, which is part of the assumption testing we discussed in the Assumptions section earlier, we show you how to do this in our enhanced Kaplan-Meier guide. If you find that you have statistically significant differences between your survival distributions, we also explain how to interpret and report the Pairwise Comparisons table. You will also need to run additional procedures in SPSS Statistics to carry out these pairwise comparisons because the 13 steps in the Test Procedure in SPSS Statistics section above do not include the procedure for pairwise comparisons.

SPSS Statistics

Survival functions

The first and best place to start understanding and interpreting your results is usually with the plot of the cumulative survival functions for the different groups of the between-subjects factor (i.e., the three groups of intervention: the "hypnotherapy programme", "nicotine patch" and use of "e-cigarette" groups). This is a plot of the cumulative survival proportion against time for each intervention group and is labelled the Survival Functions plot in SPSS Statistics. This plot is shown below:

Published with written permission from SPSS Statistics, IBM Corporation.

The plot above will help you to understand how the survival distributions compare between groups. A useful function of the plot is to illustrate whether the survival curves cross each other (i.e., whether there is an "interaction" between survival distributions). This has implications on the power of the statistical tests to detect differences between the survival distributions. In addition, you should decide whether the survival curves are similarly shaped, even if they are above or below one another. This has implications for the choice of statistical test that is used to analyse the results from the Kaplan-Meier method (i.e., whether you use the log rank test, Breslow test or Tarone-Ware test, as discussed later).

The "event" you are interested in is usually considered to be delirious (e.g., failure or death). Therefore, it is not something you want to occur. All other things being equal (e.g., censoring of cases), the more events that occur, the lower the cumulative survival proportion and the lower (i.e., on the y-axis) the survival curve on the graph. As such, a group survival curve that appears "above" another group's survival curve is usually considered to be demonstrating a beneficial/advantageous effect.

We can see from our plot that the cumulative survival proportion appears to be much higher in the hypnotherapy group compared to the nicotine patch and e-cigarette groups, which do not appear to differ considerably (although the nicotine patch intervention appears to have a small advantage on survival; that is, fewer participants resuming smoking). It would appear that the hypnotherapy programme significantly prolongs the time until participants resume smoking (i.e., the event) compared to the other interventions. However, if we inspect the curves' last cumulative survival proportion, we can see that the proportion of participants that had not resumed smoking by the end of the study does not appear that different between the intervention groups (at approximately 10%). We will look into determining if these survival curves are statistically significantly different later.

Note: Having inspected the cumulative survival plot in the previous section, it is a good idea to look at the descriptive elements from your results using the Means and Medians for Survival Time table. This will help to clarify the various survival times for your groups. To do this, you need to interpret the median values and their 95% confidence intervals. You can also plot the median survival times of the groups on top of the survival plot illustrated above. In our enhanced Kaplan-Meier guide, we explain how to interpret and report the SPSS Statistics output from the Means and Medians for Survival Time table.

SPSS Statistics

Choosing between statistical tests: The log rank test, Breslow test and Tarone-Ware test

There are three statistical tests that can be selected in SPSS Statistics that test whether the survival functions are equal. These are the log rank test (Mantel, 1966), Breslow test (Breslow, 1970; Gehan, 1965) and the Tarone-Ware test (Tarone & Ware, 1977), all of which we selected to be produced in the Test Procedure in SPSS Statistics section above. These three tests are presented in the Overall Comparisons table, as shown below:

Published with written permission from SPSS Statistics, IBM Corporation.

All three tests compare a weighted difference between the observed number of events (i.e., the resumption of smoking) and the number of expected events at every time point, but differ in how they calculate the weight. We discuss the differences between these three statistical tests and which test to choose in our enhanced Kaplan-Meier guide.

It is fairly common to find that all three tests will lead you to the same conclusion (i.e., they will all reject the null hypothesis or they all won't), but which test you choose should depend on how you expect the survival distributions to differ so as to make best use of the different weightings each test assigns to the time points (i.e., increase statistical power). Unfortunately, you cannot rely on there being one best test – it will depend on your data. If you choose the approach of picking a particular test, you will need to do this before analysing your data. You shouldn't run all of them and then simply pick the one that happens to have the "best" p-value for your study (Hosmer et al., 2008; Kleinbaum & Klein, 2012).

In our example, the log rank test is the most appropriate, so we discuss the results from this test in the next section.

SPSS Statistics

Comparison of interventions

To use the log rank test, you need to interpret the "Log Rank (Mantel-Cox)" row in the Overall Comparisons table, as highlighted below:

Published with written permission from SPSS Statistics, IBM Corporation.

The log rank test is testing the null hypothesis that there is no difference in the overall survival distributions between the groups (e.g., intervention groups) in the population. To test this null hypothesis, the log rank test calculates a χ2-statistic (the "Chi-Square" column), which is compared to a χ2-distribution with two degrees of freedom (the "df" column). In order to determine whether the survival distributions are statistically significantly different, you need to consult the "Sig." column which contains the p-value for this test. You can see that the significance value of this test is .000. This does not mean that p = .000, but that p < .0005. If you want to know the actual p-value, you can double-click the table and hover your mouse over the relevant p-value, as highlighted below:

Published with written permission from SPSS Statistics, IBM Corporation.

You can now see that the p-value is actually .000002 (i.e., p = .000002). The reason for it initially appearing that p = .000 is due to the result only being reported in the table to 3 decimal places. However, it is rare that you would quote such a small p-value, so you might simple state that p < .0005.

If p < .05, you have a statistically significant result and can conclude that the survival distributions of the different types of intervention are not equal in the population (i.e., they are not all the same). On the other hand, if p > .05, you do not have a statistically significant result and cannot conclude that the survival distributions are different in the population (i.e., they are all the same/equal). In this example, since p = .000002, we have a statistically significant result. That is, the survival distributions are different in the population.

Note: If you find that you have statistically significant differences between your survival distributions, as we do in our example, you would now need to interpret and report results from the Pairwise Comparisons table. The Pairwise Comparisons table is not produced automatically using the 13 steps in the Test Procedure in SPSS Statistics section above. Instead, you will have to run additional steps in SPSS Statistics, which we show you in our enhanced Kaplan-Meier guide. You can access the enhanced Kaplan-Meier guide by subscribing to the site here.

TAKE THE TOUR

SPSS Statistics

Reporting the output from the Kaplan-Meier method

Based on the results above, we could report the results of the study as follows:

A log rank test was run to determine if there were differences in the survival distribution for the different types of intervention: a hypnotherapy programme, wearing nicotine patches and using e-cigarettes. The survival distributions for the three interventions were statistically significantly different, χ2(2) = 25.818, p < .0005.

You'll notice that the Kaplan-Meier write-up above includes only the results from the main log rank test. If you also want to know how to write up the results from your assumption testing, descriptive statistics and pairwise comparisons, we show you in our enhanced Kaplan-Meier guide. We also show you how to write up the results using the Harvard and APA styles. You can learn more about the Kaplan-Meier method, how to set up your data in SPSS Statistics, run the Kaplan-Meier procedures, and how to interpret and write up your findings in more detail in our enhanced Kaplan-Meier guide, which you can subscribe to here.

SPSS Statistics

References

Bland, J. M., & Altman, D. G. (2004). Statistics notes: The logrank test. British Medical Journal, 328, 1073.

Breslow, N. E. (1970). A generalized Kruskal-Wallis test for comparing K samples subject to unequal patterns of censorship. Biometrika, 57, 579-594.

Gehan, E. A. (1965). A generalized Wilcoxon test for comparing arbitrarily singly-censored samples. Biometrika, 52, 203-223.

Hosmer, D. W., Lemeshow, S., & May, S. (2008). Applied survival analysis: Regression modelling of time-to-event data (2nd ed.). Hoboken, NJ: John Wiley & Sons Inc.

Kaplan, E. L., & Meier, P. (1958). Nonparametric estimation from incomplete observations. Journal of the American Statistical Association, 53, 457-485.

Kleinbaum, D. G., & Klein, M. (2012). Survival analysis: A self-learning text (3rd ed.). New York, NY: Springer.

Mantel, N. (1966). Evaluation of survival data and two new rank order statistics arising in its consideration. Cancer Chemotherapy Reports, 50, 163-170.

Norušis, M. J. (2012). IBM SPSS Statistics Statistics 19 advanced statistical procedures companion. Upper Saddle River, NJ: Prentice Hall.

Tarone, R. E., & Ware, J. (1977). On distribution free tests of the equality of survival distributions. Biometrika, 64, 156-160.

1