sim_hmm: Simulating Hidden Markov Models

Description Usage Arguments Value

View source: R/sim_hmm.R

Description

A function for simulating HMM's. Not expected to be called by user, use instead the 'simulate' method for hmm objects.

Usage

1
sim_hmm(n, delta, Gamma, rdists, include_state = FALSE)

Arguments

n

Integer, number of observations to simulate.

delta

m-dimensional vector. Initial distribution of Markov chain

Gamma

m x m matrix. Transition probs for Markov chain

rdists

List of functions f_i, where f_i(k) generates k i.i.d. copies of X|C=i

include_state

Logical. Denotes whether or not the hidden states should be included. If TRUE, they are appended to the end of the HMM.

Value

Vector of simulated HMM


AdvancedR-2021/hmm documentation built on Dec. 17, 2021, 7:41 a.m.