cure_rate_mcmc {bayesCureRateModel}R Documentation

The basic MCMC scheme.

Description

This is core MCMC function. The continuous parameters of the model are updated using (a) single-site Metropolis-Hastings steps and (b) a Metropolis adjusted Langevin diffusion step. The binary latent variables of the model (cured status per censored observation) are updated according to a Gibbs step. This function is embedded to the main function of the package cure_rate_MC3 which runs parallel tempered MCMC chains.

Usage

cure_rate_mcmc(y, X, Censoring_status, m, alpha = 1, mu_g = 1, s2_g = 1, 
	a_l = 2.1, b_l = 1.1, promotion_time = list(distribution = "weibull", 
	prior_parameters = matrix(rep(c(2.1, 1.1), 2), byrow = TRUE, 2, 2), 
	prop_scale = c(0.2, 0.03)), mu_b = NULL, Sigma = NULL, g_prop_sd = 0.045, 
	lambda_prop_scale = 0.03, b_prop_sd = NULL, initialValues = NULL, 
	plot = FALSE, verbose = FALSE, tau_mala = 1.5e-05, mala = 0.15, 
	single_MH_in_f = 0.5)

Arguments

y

observed data (time-to-event or censored time)

X

design matrix. Should contain a column of 1's if the model has a constant term.

Censoring_status

binary variables corresponding to time-to-event and censoring.

m

number of MCMC iterations.

alpha

A value between 0 and 1, corresponding to the temperature of the complete posterior distribution. The target posterior distribution corresponds to alpha = 1.

mu_g

Parameter a_{\gamma} of the prior distribution of \gamma.

s2_g

Parameter b_{\gamma} of the prior distribution of \gamma.

a_l

Shape parameter a_{\lambda} of the Inverse Gamma prior distribution of \lambda.

b_l

Scale parameter b_{\lambda} of the Inverse Gamma prior distribution of \lambda.

promotion_time

A list containing the specification of the promotion time distribution. See 'details'.

mu_b

Mean \mu of the multivariate normal prior distribution of regression coefficients. Should be a vector whose length is equal to the number of columns of the design matrix X.

Sigma

Covariance matrix of the multivariate normal prior distribution of regression coefficients.

g_prop_sd

The scale of the proposal distribution for single-site updates of the \gamma parameter.

lambda_prop_scale

The scale of the proposal distribution for single-site updates of the \lambda parameter.

b_prop_sd

The scale of the proposal distribution for the update of the \beta parameter (regression coefficients).

initialValues

A list of initial values for each parameter (optional).

plot

Boolean for plotting on the run.

verbose

Boolean for printing progress on the run.

tau_mala

scale of the MALA proposal.

mala

Propability of attempting a MALA step. Otherwise, a simple MH move is attempted.

single_MH_in_f

Probability of attempting a single-site MH move in the basic Metropolis-Hastings step. Otherwise, a joint update is attempted.

Value

A list containing the following entries

mcmc_sample

The sampled MCMC values per parameter. See 'note'.

complete_log_likelihood

Logarithm of the complete likelihood per MCMC iteration.

acceptance_rates

The acceptance rate per move.

latent_status_censored

The MCMC sample of the latent status per censored observation.

log_prior_density

Logarithm of the prior density per MCMC iteration.

Note

In the case where the promotion time distribution is a Gamma mixture model, the mixing proportions w_1,\ldots,w_K are reparameterized according to the following transformation

w_j = \frac{\rho_j}{\sum_{i=1}^{K}\rho_i}, j = 1,\ldots,K

where \rho_i > 0 for i=1,\ldots,K-1 and \rho_{K}=1. The sampler returns the parameters \rho_1,\ldots,\rho_{K-1}, not the mixing proportions.

Author(s)

Panagiotis Papastamoulis

References

Papastamoulis and Milienos (2023). Bayesian inference and cure rate modeling for event history data. arXiv:2310.06926

See Also

cure_rate_MC3

Examples

# simulate toy data just for cran-check purposes        
        set.seed(1)
        n = 10
        stat = rbinom(n, size = 1, prob = 0.5)
        x <- cbind(1, matrix(rnorm(2*n), n, 2))
        y <- rexp(n)
# run a weibull model (including const. term) 
#	for m = 10 mcmc iterations 
        fit1 <- cure_rate_mcmc(y = y, X = x, Censoring_status = stat, 
              	plot = FALSE,
                promotion_time = list(distribution = 'weibull', 
                        prior_parameters = matrix(rep(c(2.1, 1.1), 2), 
                                                byrow = TRUE, 2, 2),
                        prop_scale = c(0.1, 0.1)
                ),
                m = 10)
#	the generated mcmc sampled values         
	fit1$mcmc_sample

[Package bayesCureRateModel version 1.1 Index]