mcmc-0.6.2.0: Sample from a posterior using Markov chain Monte Carlo
Copyright(c) Dominik Schrempf 2021
LicenseGPL-3.0-or-later
Maintainerdominik.schrempf@gmail.com
Stabilityunstable
Portabilityportable
Safe HaskellNone
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

newtype MHG a Source #

The MHG algorithm.

Constructors

MHG 

Fields

mhg :: Settings -> PriorFunction a -> LikelihoodFunction a -> Cycle a -> Monitor a -> InitialState a -> GenIO -> 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.

See mcmcContinue.

type MHGRatio = Log Double Source #

MHG ratios are stored in log domain.

mhgAccept :: MHGRatio -> GenIO -> IO Bool Source #

Accept or reject a proposal with given MHG ratio?