BSBSumm {BGPhazard}R Documentation

Get posterior summaries for BSBHaz model

Description

Get posterior summaries for BSBHaz model

Usage

BSBSumm(
  bsbhaz,
  variable = c("omega1", "omega2", "lambda1", "lambda2", "gamma", "theta", "s1", "s2")
)

Arguments

bsbhaz

An object of class 'BSBHaz' created by BSBHaz.

variable

A character indicating which variable to get summaries from.

Value

A data frame with posterior sample means and a 95 % probability interval. For omega1, omega2, gamma, and theta also includes a column with the acceptance rates for the Metropolis-Hastings algorithm.

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)

BSBSumm(samples, variable = "gamma")
BSBSumm(samples, variable = "omega1")
BSBSumm(samples, variable = "lambda1")

[Package BGPhazard version 2.1.1 Index]