Skip to contents

This function creates an MCMC function for a given set of experiments. The Markov chains have no communication between them if more than one is created using this mechanism.

Usage

mcmc(update)

Arguments

update

and update function

Value

M(initiPar,N), a function of initial starting values and number of Markov chain steps

Details

The algorithm is entirely determined by the update function. Any intermediate values that updates requires aside from simulation results have to be attributes of the MCMC variable: parMCMC.

The update function: update(parGiven) -> parUpdate depends only on the given parameters, all other dependencies have to be either implicit (as a closure) or attributes of parGiven.