View source: R/add-functions.R
Add (cumulative) hazard based on the provided data set and model.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | add_hazard2(
newdata,
object,
reference = NULL,
overwrite = FALSE,
time_var = NULL,
...
)
add_cumu_hazard2(
newdata,
object,
overwrite = FALSE,
time_var = NULL,
interval_length = "intlen",
...
)
|
newdata |
A data frame or list containing the values of the model covariates at which predictions
are required. If this is not provided then predictions corresponding to the
original data are returned. If |
object |
a fitted |
reference |
A data frame with number of rows equal to |
overwrite |
Should hazard columns be overwritten if already present in
the data set? Defaults to |
time_var |
Name of the variable used for the baseline hazard. If
not given, defaults to |
... |
Further arguments passed to |
interval_length |
The variable in newdata containing the interval lengths.
Can be either bare unquoted variable name or character. Defaults to |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.