View source: R/hr_flexsurvreg.R
hr_flexsurvreg | R Documentation |
Hazard ratio as a function of time from a parametric survival model
hr_flexsurvreg(
x,
newdata = NULL,
t = NULL,
start = 0,
ci = TRUE,
B = 1000,
cl = 0.95,
na.action = na.pass
)
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 |
A data frame with estimate and confidence limits for the hazard ratio, and
one row for each of the times requested in t
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.