Compute log rank test statistic on an endpoint.
Refer to this vignette for more information and examples.
Arguments
- formula
An object of class
formulathat can be used withsurvival::coxph. Must consistarmand 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", i.e., one-sided test is enforced. 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::coxphwithties = "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'), x > 0.5), which is equivalent tofitLogrank(formula, data, arm %in% c('pbo', 'low dose') & x > 0.5). Note that if more than one treatment arm are present in the data after applying filter in..., models are fitted for placebo verse each of the treatment arms.- tidy
logical.
FALSEif more information are returned. DefaultTRUE.
