Description Usage Arguments Value References See Also
View source: R/MCMCDepGammaFirst.R
This is the sampler for the first interval in case the piecewise exponential prior with dependent Gamma heights is selected. The sampler is described in the Supplement to Castillo and Van der Pas (2020). Most users of the package will not work with this function directly, but instead use the main function BayesSurv, in which this particular function is incorporated.
1 2 3 4 5 6 7 8 9 | MCMCDepGammaFirst(
current,
next.haz,
failure,
exposure,
alpha.dep = 1,
alpha0.dep = 1.5,
beta0.dep = 1
)
|
current |
The value of the height of the first interval from the previous iteration. |
next.haz |
The value of the height of the second interval from the previous iteration. |
failure |
The number of individuals who had an event during the first interval. |
exposure |
The total amount of time all individuals were exposed for during the first interval. |
alpha.dep |
The main parameter α for the dependent Gamma
prior, as described in the documentation for BayesSurv. It is
recommended to take |
alpha0.dep |
The shape parameter for the Gamma prior on the histogram
height for the first interval. It is recommended to take |
beta0.dep |
The rate parameter for the Gamma prior on the histogram height for the first interval. |
res |
A new sample of the histogram height of the first interval. |
Castillo and Van der Pas (2020). Multiscale Bayesian survival analysis. <arXiv:2005.02889>.
BayesSurv, which computes the posterior mean and credible bands for the cumulative hazard and survival functions, as well as the posterior mean for the hazard. Within BayesSurv, the present function as well as MCMCDepGammaIntermediate is called through SamplePosteriorDepGamma.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.