BSBHaz {BGPhazard}R Documentation

BSBHaz posterior samples using Gibbs Sampler

Description

BSBHaz samples posterior observations from the bivariate survival model (BSBHaz model) proposed by Nieto-Barajas & Walker (2007).

Usage

BSBHaz(
  bsb_init,
  iter,
  burn_in = 0,
  omega_d = NULL,
  gamma_d = NULL,
  theta_d = NULL,
  seed = 42
)

Arguments

bsb_init

An object of class 'BSBinit' created by BSBInit.

iter

A positive integer. Number of samples generated by the Gibbs Sampler.

burn_in

A positive integer. Number of iterations that should be discarded as burn in period.

omega_d

A positive double. This parameter defines the interval used in the Metropolis-Hastings algorithm to sample proposals for omega. See details.

gamma_d

A positive double. This parameter defines the interval used in the Metropolis-Hastings algorithm to sample proposals for gamma. See details.

theta_d

A positive double. This parameter defines the interval used in the Metropolis-Hastings algorithm to sample proposals for theta. See details.

seed

Random seed used in sampling.

Details

BSBHaz (Nieto-Barajas & Walker, 2007) is a bayesian semiparametric model for bivariate survival data. The marginal densities are nonparametric survival models and the joint density is constructed via a mixture. Dependence between failure times is modeled using two frailties, and the dependence between these frailties is modeled with a copula.

This command obtains posterior samples from model parameters. The samples from omega, gamma, and theta are obtained using the Metropolis-Hastings algorithm. The proposal distributions are uniform for the three parameters. The parameters omega_d, gamma_d and theta_d modify the intervals from which the uniform proposals are sampled. If these parameters are too large, the acceptance rates will decrease and the chains will get stuck. On the other hand, if these parameters are small, the acceptance rates will be too high and the chains will not explore the posterior support effectively.

Value

An object of class 'BSBHaz' containing the samples from the variables of interest.

Examples

t1 <- survival::Surv(c(1, 2, 3))
t2 <- survival::Surv(c(1, 2, 3))

init <- BSBInit(t1 = t1, t2 = t2, seed = 0)
samples <- BSBHaz(init, iter = 10, omega_d = 2,
gamma_d = 10, seed = 10)

[Package BGPhazard version 2.1.1 Index]