Return example summary subgroup statistics in the format
expected by group_data_summary().
Value
A tibble with one row per subgroup level and the following columns:
variable: character, name of the subgroup variable.level: character, level of the subgroup variable.patients: integer, number of patients in the subgroup level.events: integer, number of events in the subgroup level.hazard_ratio: numeric, estimated hazard ratio of treatment versus control in the subgroup level.lower: numeric, lower bound of the 95% confidence interval of the hazard ratio.upper: numeric, upper bound of the 95% confidence interval of the hazard ratio.
Details
The statistics are computed from the same patients as
group_example_patient(): the death endpoint (etype == 2) of the
adjuvant colon cancer trial of levamisole plus fluorouracil
(Moertel et al., 1990), as distributed in survival::colon,
restricted to the observation ("Obs", control) and levamisole plus
fluorouracil ("Lev+5FU", treatment) arms.
There are three subgroup variables:
"age": age at randomization, with levels"under 60"(younger than 60 years) and"60 or over"(60 years or older)."node4": more than 4 positive lymph nodes, with levels"no"and"yes"."sex": with levels"female"and"male".
Within each subgroup level, group_analysis_summary() counts the
patients and events and fits a Cox proportional hazards model of
survival on treatment ("Lev+5FU" versus "Obs") to get the hazard
ratio. The columns lower and upper are the bounds of the 95%
Wald confidence interval of the hazard ratio from the same model, as
a publication would report them. group_data_summary() ignores
these columns, but group_data_events() can use them to approximate
the event counts.
References
Moertel CG, Fleming TR, Macdonald JS, et al. (1990). Levamisole and fluorouracil for adjuvant therapy of resected colon carcinoma. New England Journal of Medicine, 322(6), 352-358.
See also
Other example:
group_example_patient()
Examples
group_example_summary()
#> # A tibble: 6 × 7
#> variable level patients events hazard_ratio lower upper
#> <chr> <chr> <int> <int> <dbl> <dbl> <dbl>
#> 1 age under 60 280 129 0.844 0.596 1.20
#> 2 age 60 or over 339 162 0.579 0.423 0.792
#> 3 node4 no 453 177 0.659 0.489 0.889
#> 4 node4 yes 166 114 0.732 0.505 1.06
#> 5 sex female 312 152 0.863 0.628 1.19
#> 6 sex male 307 139 0.519 0.365 0.737
