Eigen.HMM_init {MatrixHMM}R Documentation

Initialization for ECM Algorithms in Matrix-Variate Hidden Markov Models

Description

Initializes the ECM algorithms used for fitting parsimonious matrix-variate Hidden Markov Models (HMMs). Parallel computing is implemented and highly recommended for faster computations.

Usage

Eigen.HMM_init(
  Y,
  k,
  density,
  mod.row = "all",
  mod.col = "all",
  nstartR = 50,
  nThreads = 1,
  verbose = FALSE,
  seed = 3
)

Arguments

Y

An array with dimensions p x r x num x t, where p is the number of variables in the rows of each data matrix, r is the number of variables in the columns of each data matrix, num is the number of data observations, and t is the number of time points.

k

An integer or vector indicating the number of states in the model(s).

density

A character string specifying the distribution to use in the HMM. Possible values are: "MVN" for the matrix-variate normal distribution, "MVT" for the matrix-variate t-distribution, and "MVCN" for the matrix-variate contaminated normal distribution.

mod.row

A character string indicating the parsimonious structure of the row covariance (or scale) matrices. Possible values are: "EII", "VII", "EEI", "VEI", "EVI", "VVI", "EEE", "VEE", "EVE", "EEV", "VVE", "VEV", "EVV", "VVV", or "all". When "all" is specified, all 14 parsimonious structures are considered.

mod.col

A character string indicating the parsimonious structure of the column covariance (or scale) matrices. Possible values are: "II", "EI", "VI", "EE", "VE", "EV", "VV", or "all". When "all" is specified, all 7 parsimonious structures are considered.

nstartR

An integer specifying the number of random starts to consider.

nThreads

A positive integer indicating the number of cores to use for parallel processing.

verbose

A logical value indicating whether to display the running output.

seed

A positive integer specifying the seed for random generation.

Value

A list containing the following elements:

results

A list of the results from the initialization.

k

The number of states fitted in each model.

req.model

A data frame listing the models that were initialized.

init.used

A data frame listing the initializations used for the required models.

index

A numeric vector to be used by the Eigen.HMM_fit() function.

dens

The density used for the HMMs.

Examples

data(simData)
Y <- simData$Y
init <- Eigen.HMM_init(Y = Y, k = 2, density = "MVT", mod.row = "EEE", mod.col = "EE", nstartR = 10)

[Package MatrixHMM version 1.0.0 Index]