Learn R Programming

RcppHMM (version 1.0.1)

initPHMM: Random Initialization for a Hidden Markov Model with Discrete Emissions

Description

Function used to generate a hidden Markov model with random parameters. The code for the methods with categorical values or continuous data can be viewed in "initHMM" and "initGHMM", respectively.

Usage

initPHMM(n)

Arguments

n

it sets the number of hidden states to use.

Value

A "list" that contains all the required values to especify the model.

Model

it especifies that the observed values are modeled by a Poisson mixture model.

StateNames

the set of hidden state names.

A

the transition matrix.

B

a vector that has the lambda parameter of each Poisson distribution.

Pi

the initial probability vector.

References

Cited references are listed on the RcppHMM manual page.

Examples

Run this code
# NOT RUN {
  n <- 2
  model <- initPHMM(n)
  print(model)
# }

Run the code above in your browser using DataLab