Compute log rank test statistic on an endpoint.
Arguments
- formula
An object of class
formula
that can be used withsurvival::coxph
. Must consistarm
and endpoint indata
. No covariate is allowed. Stratification variables are supported and can be added usingstrata(...)
.- placebo
character. String of placebo in
data$arm
.- data
data frame. Usually it is a locked data.
- alternative
a character string specifying the alternative hypothesis, must be one of
"greater"
or"less"
. No default value."greater"
means superiority of treatment over placebo is established by an hazard ratio greater than 1.- ...
subset condition that is compatible with
dplyr::filter
.survival::coxph
withties = "exact"
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(formula, data, arm %in% c('pbo', 'low dose'), pfs > 0.5)
, which is equivalent tofitLogrank(formula, data, arm %in% c('pbo', 'low dose') & pfs > 0.5)
.- tidy
logical.
FALSE
if more information are returned. DefaultTRUE
.