mcmc-0.4.0.0: Sample from a posterior using Markov chain Monte Carlo
Copyright(c) Dominik Schrempf 2020
LicenseGPL-3.0-or-later
Maintainerdominik.schrempf@gmail.com
Stabilityunstable
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Mcmc.Algorithm.Metropolis

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 Source #

Arguments

:: PriorFunction a 
-> LikelihoodFunction a 
-> Cycle a 
-> Monitor a 
-> a

The initial state in the state space a.

-> GenIO

A source of randomness. For reproducible runs, make sure to use generators with the same seed.

-> IO (MHG a) 

Initialize an MHG algorithm.

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.

mhgAccept :: Log Double -> GenIO -> IO Bool Source #

Accept or reject a proposal with given MHG ratio?