HMM.init: Initialization for the ECM algorithm

Description Usage Arguments Value Examples

View source: R/HMM_init.R

Description

Runs the initialization of the ECM algorithm used for fitting the parsimonious hidden Markov models. Parallel computing is implemented and highly recommended for a faster calculation.

Usage

1
HMM.init(X, k = 1:3, nstartR = 100, ncores = 1, verbose = FALSE)

Arguments

X

An array of dimension p x r x n 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, n is the number of data observations and t is the number of times.

k

An integer or a vector indicating the number of states of the models.

nstartR

An integer specifying the number of random starts to be considered.

ncores

A positive integer indicating the number of cores used for running in parallel.

verbose

A logical indicating whether the running output should be displayed.

Value

init

A list of objects to be used by the HMM.fit() function.

Examples

1
2
3
data(simX)

init <- HMM.init(X = simX, k = 2, nstartR = 1)

FourWayHMM documentation built on Dec. 1, 2021, 1:06 a.m.