CuMRes {BGPhazard}R Documentation

Bayesian Semiparametric Cure Rate Model with an Unknown Threshold

Description

Posterior inference for the bayesian semiparametric cure rate model in survival analysis.

Usage

CuMRes(
  times,
  delta = rep(1, length(times)),
  type.t = 3,
  K = 5,
  utao = NULL,
  alpha = rep(0.01, K),
  beta = rep(0.01, K),
  c.r = rep(1, (K - 1)),
  type.c = 4,
  epsilon = 1,
  c.nu = 1,
  a.eps = 0.1,
  b.eps = 0.1,
  a.mu = 0.01,
  b.mu = 0.01,
  iterations = 1000,
  burn.in = floor(iterations * 0.2),
  thinning = 5,
  printtime = TRUE
)

Arguments

times

Numeric positive vector. Failure times.

delta

Logical vector. Status indicator. TRUE (1) indicates exact lifetime is known, FALSE (0) indicates that the corresponding failure time is right censored.

type.t

Integer. 1=computes uniformly-dense intervals; 2= partition arbitrarily defined by the user with parameter utao and 3=same length intervals.

K

Integer. Partition length for the hazard function if type.t=1 or type.t=3.

utao

vector. Partition specified by the user when type.t = 2. The first value of the vector has to be 0 and the last one the maximum observed time, either censored or uncensored.

alpha

Nonnegative entry vector. Small entries are recommended in order to specify a non-informative prior distribution.

beta

Nonnegative entry vector. Small entries are recommended in order to specify a non-informative prior distribution.

c.r

Nonnegative vector. The higher the entries, the higher the correlation of two consecutive intervals.

type.c

1=defines c.r as a zero-entry vector; 2=lets the user define c.r freely; 3=assigns c.r by computing an exponential prior distribution with mean epsilon; 4=assigns c.r by computing an exponential hierarchical distribution with mean epsilon which in turn has a Ga(a.eps, b.eps) distribution.

epsilon

Double. Mean of the exponential distribution assigned to c.r when type.c = 3. When type.c = 4, epsilon is assigned a Ga(a.eps,b.eps) distribution.

c.nu

Tuning parameter for the proposal distribution for c.

a.eps

Numeric. Shape parameter for the prior gamma distribution of epsilon when type.c = 4.

b.eps

Numeric. Scale parameter for the prior gamma distribution of epsilon when type.c = 4.

a.mu

Numeric. Shape parameter for the prior gamma distribution of mu

b.mu

Numeric. Scale parameter for the prior gamma distribution of mu

iterations

Integer. Number of iterations including the burn.in to be computed for the Markov Chain.

burn.in

Integer. Length of the burn-in period for the Markov chain.

thinning

Integer. Factor by which the chain will be thinned. Thinning the Markov chain is to reduces autocorrelation.

printtime

Logical. If TRUE, prints out the execution time.

Details

Computes the Gibbs sampler with the full conditional distributions of all model parameters (Nieto-Barajas & Yin 2008) and arranges the resulting Markov chain into a tibble which can be used to obtain posterior summaries.

Note

It is recommended to verify chain's stationarity. This can be done by checking each element individually. See CuPlotDiag.

Examples



## Simulations may be time intensive. Be patient.
## Example 1
# data(crm3)
# times<-crm3$times
# delta<-crm3$delta
# res <- CuMRes(times, delta, type.t = 2, 
#                   K = 100, length = .1, alpha = rep(1, 100  ), 
#                   beta = rep(1, 100),c.r = rep(50, 99), 
#                   iterations = 100, burn.in = 10, thinning = 1, type.c = 2)



[Package BGPhazard version 2.1.1 Index]