Survival · 4 groups

Kaplan–Meier example: four groups (lung cancer cell type)

Kaplan–Meier curves for four tumour cell types in the Veterans’ Administration lung cancer trial, with a 3-df log-rank test and different line types.

Open this example in the editorStart from scratch

01002003004005006000.00.20.40.60.81.0Survival probabilityDayssquamous (n = 35)smallcell (n = 48)adeno (n = 27)large (n = 27)Log-rank P < 0.001Number at risksquamous3520138532smallcell481032000adeno27500000large272093110
Survival by tumour cell type in the Veterans’ Administration lung cancer trial, first 600 days.

About this example

The Veterans’ Administration lung cancer trial (Kalbfleisch and Prentice, 1980) compares survival across four histological cell types. With more than two groups, the log-rank test has k − 1 degrees of freedom and tests whether any group differs.

Four curves are easier to tell apart with both color and line type, which also keeps the figure readable in black and white. The time axis stops at 600 days, where only a few patients are still at risk; hazard ratios against squamous cell carcinoma are in the methods text rather than on the plot.

The data

DaysDiedCelltype
721squamous
4111squamous
2281squamous
1261squamous
1181squamous
101squamous
821squamous
1101squamous
3141squamous
1000squamous
421squamous
81squamous
1441squamous
250squamous
111squamous

…and 122 more rows. Open the example to see all of them.

Open the example, replace the data with your own, and export the figure as SVG, PDF, PNG or TIFF.

More examples