Skip to contents

Fit Cox proportional hazards model on an time-to-event endpoint.

Usage

fitCoxph(endpoint, placebo, data, ...)

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).

Value

a data frame with three columns:

p

one-sided p-value for log hazard ratio (alternative hypothesis: log hazard ratio > 0).

info

the number of events of the endpoint in the subset.

z

the z statistics of log hazard ratios.