Fit Cox proportional hazards model on an time-to-event endpoint.
Arguments
- endpoint
Character. Name of the endpoint in
data
.- placebo
Character. String indicating the placebo in
data$arm
.- data
Data frame. Usually it is a locked data set.
- ...
Subset conditions compatible with
dplyr::filter
.coxph
will be fitted on this subset only. This argument can be useful to create a subset of data for analysis when a trial consists of more than two arms. By default, it is not specified, all data will be used to fit the model. More than one condition can be specified in...
, e.g.,fitCoxph('pfs', 'pbo', data, arm %in% c('pbo', 'low dose'), pfs > 0.5)
, which is equivalent to:fitCoxph('pfs', 'pbo', data, arm %in% c('pbo', 'low dose') & pfs > 0.5)
.