Description Usage Arguments Value References See Also
View source: R/RadiusCredibleSet.R
This function finds a radius such that (1-alpha)100% of posterior draws are within a distance of at most this radius to the posterior mean. Most users will not use this function directly, but instead use BayesSurv, in which this function is used.
1 | RadiusCredibleSet(draws, post.mean, alpha = 0.05)
|
draws |
A matrix of posterior draws of either the cumulative hazard or the survival. Each row contains a draw, the columns correspond to time points on which the cumulative hazard or survival is evaluated. |
post.mean |
The posterior mean of the cumulative hazard or survival function, evaluated at the same time points as the draws. |
alpha |
The credible band will be such that (1-alpha)100% of draws is contained in it. |
radius |
The radius of the credible set. |
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.