MCMCDepGammaFirst: Sampler for the first interval for the piecewise exponential...

Description Usage Arguments Value References See Also

View source: R/MCMCDepGammaFirst.R

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

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
)

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 α for the dependent Gamma prior, as described in the documentation for BayesSurv. It is recommended to take alpha.dep smaller than alpha0.dep.

alpha0.dep

The shape parameter for the Gamma prior on the histogram height for the first interval. It is recommended to take alpha.dep smaller than alpha0.dep.

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.


BayesSurvival documentation built on March 13, 2021, 1:07 a.m.