mcmccontrol: Markov chain Monte Carlo (MCMC) parameters

View source: R/mcmccontrol.R

mcmccontrolR Documentation

Markov chain Monte Carlo (MCMC) parameters

Description

This function is used to set various parameters controlling the Markov chain Monte Carlo (MCMC) parameters.

Usage

mcmccontrol(nsave = 8000, nburn = 2000, nskip = 1)

Arguments

nsave

An integer giving the total number of scans to be saved (does not include the burn-in and thinning iterations).

nburn

An integer giving the number of burn-in scans.

nskip

An integer giving the thinning interval,

Details

The value returned by this function is used as a control argument of the DDPstar function.

Value

A list with components for each of the possible arguments.

See Also

DDPstar

Examples

library(DDPstar)
data(dde)
dde$GAD <- dde$GAD/7 # GAD in weeks

mcmc <- mcmccontrol(nburn = 20000, nsave = 15000, nskip = 1)

set.seed(10) # For reproducibility
fit_dde <- DDPstar(formula = GAD ~ f(DDE, bdeg = 3, nseg = 20, pord = 2, atau = 1, btau = 0.005), 
  data = dde, mcmc = mcmc, prior = list(a = 2, b = 0.5, aalpha = 2, balpha = 2, L = 20), 
  standardise = TRUE, compute.lpml = TRUE, compute.WAIC = TRUE, compute.DIC = TRUE)
summary(fit_dde)



DDPstar documentation built on April 3, 2025, 8:46 p.m.