View source: R/LangevinGibbs.R
LangevinGibbs | R Documentation |
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.
LangevinGibbs(
formula,
data,
K = 15,
penorder = 3,
deltaprior = 1e-04,
mcmcsample = 10000,
burnin = 2000,
tunparam = 0.25,
mcmcseed = NULL,
progbar = c("yes", "no")
)
formula |
A model formula of the form |
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. |
Oswaldo Gressani oswaldo_gressani@hotmail.fr .
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.