extract_survival_subgroups {tern} | R Documentation |
Prepare survival data for population subgroups in data frames
Description
Prepares estimates of median survival times and treatment hazard ratios for population subgroups in
data frames. Simple wrapper for h_survtime_subgroups_df()
and h_coxph_subgroups_df()
. Result is a list
of two data.frame
s: survtime
and hr
. variables
corresponds to the names of variables found in data
,
passed as a named list
and requires elements tte
, is_event
, arm
and optionally subgroups
and strata
.
groups_lists
optionally specifies groupings for subgroups
variables.
Usage
extract_survival_subgroups(
variables,
data,
groups_lists = list(),
control = control_coxph(),
label_all = "All Patients"
)
Arguments
variables |
(named |
data |
( |
groups_lists |
(named |
control |
(
|
label_all |
( |
Value
A named list
of two elements:
-
survtime
: Adata.frame
containing columnsarm
,n
,n_events
,median
,subgroup
,var
,var_label
, androw_type
. -
hr
: Adata.frame
containing columnsarm
,n_tot
,n_tot_events
,hr
,lcl
,ucl
,conf_level
,pval
,pval_label
,subgroup
,var
,var_label
, androw_type
.