Compute log rank test statistic on an endpoint.
Arguments
- endpoint
character. Name of endpoint in
data
.- placebo
character. String of placebo in
data$arm
.- data
data frame. Usually it is a locked data.
- ...
subset condition that is compatible with
dplyr::filter
.survival::survdiff
will be fitted on this subset only. This argument could 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 conditions can be specified in...
, e.g.,fitLogrank('pfs', 'pbo', data, arm %in% c('pbo', 'low dose'), pfs > 0.5)
, which is equivalent tofitLogrank('pfs', 'pbo', data, arm %in% c('pbo', 'low dose') & pfs > 0.5)
.