mcmc-0.8.3.1: 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.MC3

Description

Creation date: Mon Nov 23 15:20:33 2020.

The Metropolis-coupled Markov chain Monte Carlo (MC3) algorithm.

Also known as parallel tempering.

Like any other parallel MCMC algorithm, the MC3 algorithm is essentially an MHG algorithm on the product space of all parallel chains.

For example, see

  • Geyer, C. J., Markov chain monte carlo maximum likelihood, Computing Science and Statistics, Proceedings of the 23rd Symposium on the Interface, (1991).
  • Altekar, G., Dwarkadas, S., Huelsenbeck, J. P., & Ronquist, F., Parallel metropolis coupled markov chain monte carlo for bayesian phylogenetic inference, Bioinformatics, 20(3), 407–415 (2004).
Synopsis

Definitions

newtype NChains Source #

Total number of parallel chains.

Must be two or larger.

Constructors

NChains 

Fields

Instances

Instances details
FromJSON NChains Source # 
Instance details

Defined in Mcmc.Algorithm.MC3

ToJSON NChains Source # 
Instance details

Defined in Mcmc.Algorithm.MC3

Read NChains Source # 
Instance details

Defined in Mcmc.Algorithm.MC3

Show NChains Source # 
Instance details

Defined in Mcmc.Algorithm.MC3

Eq NChains Source # 
Instance details

Defined in Mcmc.Algorithm.MC3

Methods

(==) :: NChains -> NChains -> Bool #

(/=) :: NChains -> NChains -> Bool #

newtype SwapPeriod Source #

The period of proposing state swaps between chains.

Must be one or larger.

Constructors

SwapPeriod 

Fields

newtype NSwaps Source #

The number of proposed swaps at each swapping event.

Must be in [1, NChains - 1].

Constructors

NSwaps 

Fields

Instances

Instances details
FromJSON NSwaps Source # 
Instance details

Defined in Mcmc.Algorithm.MC3

ToJSON NSwaps Source # 
Instance details

Defined in Mcmc.Algorithm.MC3

Read NSwaps Source # 
Instance details

Defined in Mcmc.Algorithm.MC3

Show NSwaps Source # 
Instance details

Defined in Mcmc.Algorithm.MC3

Eq NSwaps Source # 
Instance details

Defined in Mcmc.Algorithm.MC3

Methods

(==) :: NSwaps -> NSwaps -> Bool #

(/=) :: NSwaps -> NSwaps -> Bool #

type MHGChains a = Vector (MHG a) Source #

Vector of MHG chains.

type ReciprocalTemperatures = Vector Double Source #

Vector of reciprocal temperatures.

Metropolis-coupled Markov chain Monte Carlo algorithm

data MC3 a Source #

The MC3 algorithm.

Constructors

MC3 

Fields

mc3 :: MC3Settings -> Settings -> PriorFunction a -> LikelihoodFunction a -> Cycle a -> Monitor a -> InitialState a -> StdGen -> IO (MC3 a) Source #

Initialize an MC3 algorithm with a given number of chains.

Call error if:

  • The number of chains is one or lower.
  • The swap period is zero or negative.

mc3Save :: ToJSON a => AnalysisName -> MC3 a -> IO () Source #

Save an MC3 algorithm.

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

Load an MC3 algorithm.

Also create a backup of the save.

See mcmcContinue.