Learn R Programming

RcppHMM (version 1.2.2.1)

initGHMM: Random Initialization for a Hidden Markov Model with emissions modeled as continuous variables

Description

Function used to generate a hidden Markov model with continuous variables and random parameters. This method allows using the univariate version of a Gaussian Mixture Model when setting m = 1. The code for the methods with categorical values or discrete data can be viewed in "initHMM" and "initPHMM", respectively.

Usage

initGHMM(n,m)

Value

A "list" that contains the required values to specify the model.

Model

it specifies that the observed values are to be modeled as a Gaussian mixture model.

StateNames

the set of hidden state names.

A

the transition probabilities matrix.

Mu

a matrix of means of the observed variables (rows) in each states (columns).

Sigma

a 3D matrix that has the covariance matrix of each state. The number of slices is equal to the maximum number of hidden states.

Pi

the initial probability vector.

Arguments

n

the number of hidden states to use.

m

the number of variables generated by the hidden states (Dimensionality of the bbserved vector).

References

Cited references are listed on the RcppHMM manual page.

Examples

Run this code
n <- 3
m <- 5
model <- initGHMM(n, m)
print(model)

Run the code above in your browser using DataLab