LangevinGibbs: Langevin-Gibbs sampler for inference in a mixture cure model.

View source: R/LangevinGibbs.R

LangevinGibbsR Documentation

Langevin-Gibbs sampler for inference in a mixture cure model.

Description

This routine implements a Metropolis-Langevin-within-Gibbs sampler to draw samples from the posterior distribution of a mixture cure model. A Metropolis-adjusted Langevin algorithm is used to sample from the conditional posterior distribution of the latent vector. MCMC samples for the roughness penalty parameter and the dispersion parameter are obtained via a Gibbs sampler.

Usage

LangevinGibbs(
  formula,
  data,
  K = 15,
  penorder = 3,
  deltaprior = 1e-04,
  mcmcsample = 10000,
  burnin = 2000,
  tunparam = 0.25,
  mcmcseed = NULL,
  progbar = c("yes", "no")
)

Arguments

formula

A model formula of the form Surv(tobs,delta)~ inci()+late().

data

A data frame.

K

The number of B-spline coefficients.

penorder

The order of the penalty associated to the B-spline coefficients.

deltaprior

The parameters of the Gamma prior for the dispersion parameter.

mcmcsample

The length of the MCMC chain.

burnin

The length of the burnin.

tunparam

The initial tuning parameter of the MLWG algorithm, default is 0.25.

mcmcseed

The seed to be used (for reproducibility).

progbar

Should a progress bar be shown? Default is yes.

Author(s)

Oswaldo Gressani oswaldo_gressani@hotmail.fr .


oswaldogressani/mixcurelps documentation built on Oct. 30, 2024, 10:45 p.m.