hr_flexsurvreg {flexsurv} | R Documentation |
Hazard ratio as a function of time from a parametric survival model
Description
Hazard ratio as a function of time from a parametric survival model
Usage
hr_flexsurvreg(
x,
newdata = NULL,
t = NULL,
start = 0,
ci = TRUE,
B = 1000,
cl = 0.95,
na.action = na.pass
)
Arguments
x |
Object returned by |
newdata |
A data frame with two rows, each specifying a set of covariate values.
The hazard ratio is calculated as hazard(z2)/hazard(z1), where z1 is the first row
of
|
t |
Times to calculate fitted values for. By default, these are the sorted unique observation (including censoring) times in the data - for left-truncated datasets these are the "stop" times. |
start |
Optional left-truncation time or times. The returned
survival, hazard or cumulative hazard will be conditioned on survival up to
this time. Predicted times returned with A vector of the same length as |
ci |
Set to |
B |
Number of simulations from the normal asymptotic distribution of
the estimates used to calculate confidence intervals or standard errors.
Decrease for greater
speed at the expense of accuracy, or set |
cl |
Width of symmetric confidence intervals, relative to 1. |
na.action |
Function determining what should be done with missing values in |
Value
A data frame with estimate and confidence limits for the hazard ratio, and
one row for each of the times requested in t
.