DMHMarkovChain

class DMHMarkovChain(initialState: Int = 1, proposalMatrix: Array<DoubleArray>, alphaMatrix: Array<DoubleArray>, streamNumber: Int = 0, streamProvider: RNStreamProviderIfc = KSLRandom.DefaultRNStreamProvider, name: String? = null) : DMarkovChain(source)

Randomly generates the states of a discrete Markov Chain for a Metropolis-Hastings process. Assumes that the states are labeled 1, 2, 3, etc. The transition probabilities are supplied as an array of arrays. transMatrix0 holds the array of transition probabilities for transition to each state {p11, p12, p13, .., p1n} for state 1 transMatrix1 holds the array of transition probabilities for transition to each state {p21, p22, p23, .., p2n} for state 2 etc.

Author

rossetti

Parameters

initialState

the initial state

proposalMatrix

the single step transition matrix

alphaMatrix

the acceptance matrix

streamNumber

the random number stream number, defaults to 0, which means the next stream

streamProvider

the provider of random number streams, defaults to KSLRandom.DefaultRNStreamProvider

name

an optional name

Constructors

Link copied to clipboard
constructor(initialState: Int = 1, proposalMatrix: Array<DoubleArray>, alphaMatrix: Array<DoubleArray>, streamNumber: Int = 0, streamProvider: RNStreamProviderIfc = KSLRandom.DefaultRNStreamProvider, name: String? = null)

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open override fun toString(): String