Eigen.HMM_fit {MatrixHMM}R Documentation

Fitting Parsimonious Hidden Markov Models for Matrix-Variate Longitudinal Data

Description

Fits parsimonious Hidden Markov Models for matrix-variate longitudinal data using ECM algorithms. The models are based on the matrix-variate normal, matrix-variate t, and matrix-variate contaminated normal distributions. Parallel computing is implemented and highly recommended for faster model fitting.

Usage

Eigen.HMM_fit(
  Y,
  init.par = NULL,
  tol = 0.001,
  maxit = 500,
  nThreads = 1,
  verbose = FALSE
)

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.

init.par

A list of initial values for starting the algorithms, as generated by the Eigen.HMM_init() function.

tol

A numeric value specifying the tolerance level for the ECM algorithms' convergence.

maxit

A numeric value specifying the maximum number of iterations for the ECM algorithms.

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.

Value

A list containing the following elements:

results

A list of the results from the fitted models.

c.time

A numeric value providing information on the computational time required to fit all models for each state.

models

A data frame listing the models that were fitted.

Examples

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

[Package MatrixHMM version 1.0.0 Index]