Usage
h_tbl_coxph_pairwise(df, variables, control_coxph_pw = control_coxph())
Arguments
- df
(
data frame
)
data set containing all analysis variables.- variables
-
(named
list
) of variable names. Details are:tte
: variable indicating time-to-event duration values (numeric
).is_event
: event variable (logical
)TRUE
if event,FALSE
if time to event is censored.arm
: the treatment group variable (factor
).strat
: (character
orNULL
) variable names indicating stratification factors.
- control_coxph_pw
-
(
list
)
parameters for comparison details, specified by using
the helper functioncontrol_coxph()
. Some possible parameter options are:pval_method
: (string
)
p-value method for testing hazard ratio = 1. Default method is "log-rank", can also be set to "wald" or "likelihood".ties
: (string
)
specifying the method for tie handling. Default is "efron", can also be set to "breslow" or "exact". See more insurvival::coxph()
conf_level
: (proportion
)
confidence level of the interval for HR.
Examples
if (FALSE) {
library(scda)
library(dplyr)
adtte <- synthetic_cdisc_data("latest")$adtte %>%
filter(PARAMCD == "OS") %>%
mutate(is_event = CNSR == 0)
h_tbl_coxph_pairwise(
df = adtte,
variables = list(tte = "AVAL", is_event = "is_event", arm = "ARM"),
control_coxph_pw = control_coxph(conf_level = 0.9)
)
}