Function to construct a generic Metropolis-Hastings MCMC algorithm for Bayesian inference.
Function to construct a generic Metropolis-Hastings MCMC algorithm for Bayesian inference. Note that this algorithm avoids re-computation of the log-likelihood associated with the current state, and is therefore suitable for use with the log of an unbiased estimate of likelihood for the constuction of pseudo-marginal "exact approximate" MCMC algorithms.
The initial state of the MCMC algorithm
The log-likelihood of the model
A function to sample from a proposal distribution
A function to evaluate the log-likelihood of the proposal transition kernel
A function to evaluate the log of the prior density
Should the function print diagnostic information to the console at each iteration?
An infinite Stream
corresponding to the MCMC chain. Note that this can be processed with typical Scala combinators such as drop
(for burn-in) and take
(for run-length). If Types
are imported, there is also a thin
method (which can be used for thinning the chain).
Function for executing one step of a MH algorithm.
Function for executing one step of a MH algorithm. Called by mhStream
.
Wrapper around the other summary
function which takes a Stream
Wrapper around the other summary
function which takes a Stream
A *finite* stream of MCMC iterations.
Generate plots?
Generate some basic diagnostics associated with an MCMC run.
Generate some basic diagnostics associated with an MCMC run. Called purely for the side-effect of generating output on the console.
A matrix, such as generated by toDMD
containing MCMC output
Generate plots?
Utility function to convert a *finite* Stream
(or other collection) to a Breeze DenseMatrix[Double]
.
Utility function to convert a *finite* Stream
(or other collection) to a Breeze DenseMatrix[Double]
.
Input stream/collection, which must be *finite*.
A matrix with rows corresponding to iterations and columns corresponding to variables.
Functions for constucting generic Metropolis-Hastings MCMC algorithms, and associated utilities. Can be used in conjunction with an unbiased estimate of marginal model likelihood for constructing pseudo-marginal MCMC algorithms, such as PMMH pMCMC.