Description Usage Arguments Value References See Also
View source: R/SurvivalFromCumhaz.R
Most users will not use this function directly, but will instead use the main
function BayesSurv, which calls this function. This function may be
used to create posterior draws of the survival function, based on posterior
draws of the cumulative hazard. It does so at a number of equispaced time
points on the interval [0, time.max
- surv.epsilon
], with the
number equal to the product of the number of intervals used in the prior, and
a user-defined factor.
1 | SurvivalFromCumhaz(cumhaz, time.max, surv.factor = 10, surv.epsilon = 1e-10)
|
cumhaz |
A matrix containing posterior draws of the cumulative. Each row contains one draw, the columns correspond to each interval. The values in each draw are the values of the cumulative hazard at the end of the corresponding interval. |
time.max |
The maximum follow-up time to consider, corresponding to the parameter τ in Castillo and Van der Pas (2020). |
surv.factor |
The survival function is computed on an equispaced grid
consisting of |
surv.epsilon |
The survival function is computed on the interval [0,
|
surv(eval.vec) |
A numeric vector containing the posterior mean of
the survival function, evaluated at |
Castillo and Van der Pas (2020). Multiscale Bayesian survival analysis. <arXiv:2005.02889>.
BayesSurv, which computes the posterior mean and the radius of the credible band for the cumulative hazard function as well as the survival, and the posterior mean for the hazard. These objects can then be visualized by using PlotBayesSurv.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.