Survival times, in months, of 30 patients with melanoma, from two immunotherapy treatment groups and stratified by age group (Collett, 2023, Example 2.15).
Format
A data frame with 30 rows and 4 variables:
- age
Age group: 1 = 21-40 years, 2 = 41-60 years, 3 = 61 years and over.
- treatment
Treatment: 1 = BCG vaccine, 2 = Corynebacterium parvum vaccine.
- time
Survival time in months.
- status
Event indicator: 1 = death, 0 = right-censored.
Source
Collett, D. (2023) Modelling Survival Data in Medical Research, 4th ed. Chapman & Hall/CRC, Examples 2.15 and 2.16 (Table 2.9). Data from Lee and Wang (2013).
Details
The tumour was removed surgically before randomisation. The data are used to illustrate the log-rank test for comparing two treatment groups within each age stratum (Examples 2.15 and 2.16) and the log-rank test for trend.
Aliases
The data set is available under the aliases d2.15, d2.16; dX.Y is the
alias for the data set used in Example X.Y of Collett (2023). See
dataset_by_exercise for the complete index.
Examples
# Collett (2023), Chapter 17 style -----------------------------------
# Examples 2.15 and 2.16: log-rank test within each age stratum
survival::survfit(
survival::Surv(time, status) ~ treatment + strata(age),
data = melanoma
)
#> Call: survfit(formula = survival::Surv(time, status) ~ treatment +
#> strata(age), data = melanoma)
#>
#> n events median 0.95LCL 0.95UCL
#> treatment=1, strata(age)=age=1 6 2 NA 19 NA
#> treatment=1, strata(age)=age=2 3 1 NA 4 NA
#> treatment=1, strata(age)=age=3 2 2 7.5 5 NA
#> treatment=2, strata(age)=age=1 9 3 24.0 24 NA
#> treatment=2, strata(age)=age=2 7 1 NA NA NA
#> treatment=2, strata(age)=age=3 3 1 NA 8 NA
survival::survdiff(
survival::Surv(time, status) ~ treatment + strata(age),
data = melanoma
)
#> Call:
#> survival::survdiff(formula = survival::Surv(time, status) ~ treatment +
#> strata(age), data = melanoma)
#>
#> N Observed Expected (O-E)^2/E (O-E)^2/V
#> treatment=1 11 5 3.76 0.407 0.688
#> treatment=2 19 5 6.24 0.245 0.688
#>
#> Chisq= 0.7 on 1 degrees of freedom, p= 0.4
# Modern tools --------------------------------------------------------
if (requireNamespace("ggsurvfit", quietly = TRUE)) {
ggsurvfit::survfit2(
survival::Surv(time, status) ~ treatment + strata(age),
data = melanoma
) |>
ggsurvfit::ggsurvfit()
}