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.Chain.Chain

Description

Creation date: Tue May 5 18:01:15 2020.

Synopsis

Documentation

type InitialState a = a Source #

Type synonym to indicate the initial state.

data Chain a Source #

The chain contains all information to run an MCMC sampler.

The state of a chain has type a. If necessary, the type a can also be used to store auxiliary information.

For example, the chain stores information about the current Link and iteration, the Trace, the Acceptance rates, and the random number generator.

Further, the chain includes auxiliary variables and functions such as the prior and likelihood functions, or Proposals to move around the state space and to Monitor an MCMC run.

The Environment of the chain is not stored externally.

Constructors

Chain 

Fields

  • link :: Link a

    The current Link of the chain combines the current state and the current likelihood. The link is updated after a proposal has been executed.

  • iteration :: Int

    The current iteration. In contrast to the link, the iteration is updated only after all proposals in the cycle have been executed.

  • trace :: Trace a

    The Trace of the Markov chain. In contrast to the link, the trace is updated only after all proposals in the cycle have been executed.

  • acceptances :: Acceptances (Proposal a)

    For each Proposal, store actual acceptance counts and for some proposals also expected acceptance rates.

  • generator :: IOGenM StdGen

    The random number generator.

  • start :: Int

    Starting iteration of the chain; used to calculate run time and ETA.

  • priorFunction :: PriorFunction a

    The prior function. The un-normalized posterior is the product of the prior and the likelihood.

  • likelihoodFunction :: LikelihoodFunction a

    The likelihood function. The un-normalized posterior is the product of the prior and the likelihood.

  • cycle :: Cycle a

    A set of Proposals form a Cycle.

  • monitor :: Monitor a

    A Monitor observing the chain.