wmst_surv | R Documentation |
Create a new object which stores user-specified survival distribution
information in the format needed for the main function, RMSTpow
. survdef
is used when the user wishes to specify a piecewise expoenential survival
distribution. Either the hazard on fixed intervals or survival probabilities
at fixed times can be specified.
wmst_surv(haz = NA, surv = NA, times = NA)
haz |
a vector of hazards of length<=10. If a single hazard is
specified, the survival distribution is exponential with the specified
hazard. If |
surv |
a vector of survival probabilities of length<=10 corresponding to
|
times |
a vector of the same length as surv (if surv is specified) or one element shorter than haz (if haz is specified). No times term is required if a single hazard is specified in haz. |
a list with components:
S |
a vectorized function that takes time as input and returns the survival probability at that time |
h |
a vectorized function that takes time as input and returns the hazard at that time |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.