mcmc-0.8.1.0: Sample from a posterior using Markov chain Monte Carlo
Copyright2021 Dominik Schrempf
LicenseGPL-3.0-or-later
Maintainerdominik.schrempf@gmail.com
Stabilityunstable
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Mcmc.Algorithm.MHG

Description

Creation date: Tue May 5 20:11:30 2020.

The Metropolis-Hastings-Green (MHG) algorithm.

For example, see Geyer, C. J., Introduction to Markov chain Monte Carlo, In Handbook of Markov Chain Monte Carlo (pp. 45) (2011). CRC press.

Synopsis

Documentation

mhg :: Settings -> PriorFunction a -> LikelihoodFunction a -> Cycle a -> Monitor a -> InitialState a -> StdGen -> IO (MHG a) Source #

Initialize an MHG algorithm.

NOTE: Computation in the IO Monad is necessary because the trace is mutable.

mhgSave :: ToJSON a => AnalysisName -> MHG a -> IO () Source #

Save an MHG algorithm.

mhgLoad :: FromJSON a => PriorFunction a -> LikelihoodFunction a -> Cycle a -> Monitor a -> AnalysisName -> IO (MHG a) Source #

Load an MHG algorithm.

Also create a backup of the save.

See mcmcContinue.

mhgLoadUnsafe :: FromJSON a => PriorFunction a -> LikelihoodFunction a -> Cycle a -> Monitor a -> AnalysisName -> IO (MHG a) Source #

Like mhgLoad but do not perform sanity checks.

Also create a backup of the save.

Useful when restarting a run with changed prior function, likelihood function or proposals. Use with care!

type MHGRatio = Log Double Source #

MHG ratios are stored in log domain.

mhgAccept :: MHGRatio -> IOGenM StdGen -> IO Bool Source #

Accept or reject a proposal with given MHG ratio?