MCMCDepGammaFirst {BayesSurvival} | R Documentation |
Sampler for the first interval for the piecewise exponential prior with dependent Gamma heights.
Description
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.
Usage
MCMCDepGammaFirst(
current,
next.haz,
failure,
exposure,
alpha.dep = 1,
alpha0.dep = 1.5,
beta0.dep = 1
)
Arguments
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 |
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. |
Value
res |
A new sample of the histogram height of the first interval. |
References
Castillo and Van der Pas (2020). Multiscale Bayesian survival analysis. <arXiv:2005.02889>.
See Also
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.