sample_X: Sample hidden states

Description Usage Arguments Value

Description

Sample X consequtive states from the hidden markov model

Usage

1
sample_X(sample_X0, L, Px)

Arguments

sample_X0

A prior distribution on X0; sample_X0() should return an integer in the range 1:(dim(Px)[1]); e.g. “function() sample(M,1)” for a uniform distribution on 1:M or “function() i” for a point mass at i.

L

the length of the desired sequence of samples

Px

The transition rates of the markov chain X to be sampled from.

Value

A vector of samples from X of length L.


Cronjaeger/HotBirdHMM documentation built on May 9, 2019, 6:01 p.m.