Learn R Programming

PrevMap (version 1.5.4)

control.mcmc.Bayes: Control settings for the MCMC algorithm used for Bayesian inference

Description

This function defines the different tuning parameter that are used in the MCMC algorithm for Bayesian inference.

Usage

control.mcmc.Bayes(
  n.sim,
  burnin,
  thin,
  h.theta1 = 0.01,
  h.theta2 = 0.01,
  h.theta3 = 0.01,
  L.S.lim = NULL,
  epsilon.S.lim = NULL,
  start.beta = "prior mean",
  start.sigma2 = "prior mean",
  start.phi = "prior mean",
  start.S = "prior mean",
  start.nugget = "prior mean",
  c1.h.theta1 = 0.01,
  c2.h.theta1 = 1e-04,
  c1.h.theta2 = 0.01,
  c2.h.theta2 = 1e-04,
  c1.h.theta3 = 0.01,
  c2.h.theta3 = 1e-04,
  linear.model = FALSE,
  binary = FALSE
)

Arguments

n.sim

total number of simulations.

burnin

initial number of samples to be discarded.

thin

value used to retain only evey thin-th sampled value.

h.theta1

starting value of the tuning parameter of the proposal distribution for \(\theta_{1} = \log(\sigma^2)/2\). See 'Details' in binomial.logistic.Bayes or linear.model.Bayes.

h.theta2

starting value of the tuning parameter of the proposal distribution for \(\theta_{2} = \log(\sigma^2/\phi^{2 \kappa})\). See 'Details' in binomial.logistic.Bayes or linear.model.Bayes.

h.theta3

starting value of the tuning parameter of the proposal distribution for \(\theta_{3} = \log(\tau^2)\). See 'Details' in binomial.logistic.Bayes or linear.model.Bayes.

L.S.lim

an atomic value or a vector of length 2 that is used to define the number of steps used at each iteration in the Hamiltonian Monte Carlo algorithm to update the spatial random effect; if a single value is provided than the number of steps is kept fixed, otherwise if a vector of length 2 is provided the number of steps is simulated at each iteration as floor(runif(1,L.S.lim[1],L.S.lim[2]+1)).

epsilon.S.lim

an atomic value or a vector of length 2 that is used to define the stepsize used at each iteration in the Hamiltonian Monte Carlo algorithm to update the spatial random effect; if a single value is provided than the stepsize is kept fixed, otherwise if a vector of length 2 is provided the stepsize is simulated at each iteration as runif(1,epsilon.S.lim[1],epsilon.S.lim[2]).

start.beta

starting value for the regression coefficients beta.

start.sigma2

starting value for sigma2.

start.phi

starting value for phi.

start.S

starting value for the spatial random effect.

start.nugget

starting value for the variance of the nugget effect; default is NULL if the nugget effect is not present.

c1.h.theta1

value of \(c_{1}\) used to adaptively tune the variance of the Gaussian proposal for the transformed parameter log(sigma2)/2; see 'Details' in binomial.logistic.Bayes or linear.model.Bayes.

c2.h.theta1

value of \(c_{2}\) used to adaptively tune the variance of the Gaussian proposal for the transformed parameter log(sigma2)/2; see 'Details' in binomial.logistic.Bayes or linear.model.Bayes.

c1.h.theta2

value of \(c_{1}\) used to adaptively tune the variance of the Gaussian proposal for the transformed parameter log(sigma2.curr/(phi.curr^(2*kappa))); see 'Details' in binomial.logistic.Bayes or linear.model.Bayes.

c2.h.theta2

value of \(c_{2}\) used to adaptively tune the variance of the Gaussian proposal for the transformed parameter log(sigma2.curr/(phi.curr^(2*kappa))); see 'Details' in binomial.logistic.Bayes or linear.model.Bayes.

c1.h.theta3

value of \(c_{1}\) used to adaptively tune the variance of the Gaussian proposal for the transformed parameter log(tau2); see 'Details' in binomial.logistic.Bayes or linear.model.Bayes.

c2.h.theta3

value of \(c_{2}\) used to adaptively tune the variance of the Gaussian proposal for the transformed parameter log(tau2); see 'Details' in binomial.logistic.Bayes or linear.model.Bayes.

linear.model

logical; if linear.model=TRUE, the control parameters are set for the geostatistical linear model. Default is linear.model=FALSE.

binary

logical; if binary=TRUE, the control parameters are set the binary geostatistical model. Default is binary=FALSE.

Value

an object of class "mcmc.Bayes.PrevMap".