Metropolis sampler after a Metropolis within Gibbs Sampler

MCMC(
  niterMwG,
  niterMH,
  parwalk,
  parinit,
  Rexp,
  tdensD,
  alpha,
  parprior,
  adaptive,
  calibration
)

Arguments

niterMwG

number of iterations of the Metropolis withing Gibbss algorithm mainly used to infer a covariance matrix for the random walk in the upcoming MH algorithm

niterMH

number of iterations of the Metropolis Hastings algorithm

parwalk

vector of variances for the random walk

parinit

vector of initial parameters rhos, variance of the observation noise, variance of the discrepancy and (if calibration) thetas

Rexp

residual of field data vs simulator

tdensD

output of the function tensordist

alpha

power in the exponential kernel

parprior

prior parameters for the parameters

adaptive

boolean to adapt the random walk

calibration

list of needed field if a calibration is to be performed in this order 1) computer model, 2) field observation, 3) field variable, 4) boolean indicating whether calibration is to be performed or not.

Value

Posterior sample in the transformed space

Details

The MwG sampler is used to estimate a covariance matrix for the random walk in the upcoming Metropolis sampler.