atp.MVT {MatrixHMM}R Documentation

Atypical Detection Points Using Matrix-Variate t Hidden Markov Models

Description

Detects atypical matrices via matrix-variate t Hidden Markov Models given a specified value of epsilon.

Usage

atp.MVT(Y, M, U, V, class, epsilon)

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.

M

An array with dimensions p x p x k, where k is the number of states, containing the mean matrices.

U

An array with dimensions p x p x k, where k is the number of states, containing the row covariance (scale) matrices.

V

An array with dimensions r x r x k, where k is the number of states, containing the column covariance (scale) matrices.

class

An num x t matrix containing the state memberships.

epsilon

A numeric value specifying the selected percentile of the chi-squared distribution with pr degrees of freedom.

Value

An num x t matrix containing, for each observation and time, a 0 if it that matrix is typical and 1 otherwise.

Examples

data("simData2")
Y <- simData2$Y
init <- Eigen.HMM_init(Y = Y, k = 2, density = "MVT", mod.row = "EEE", mod.col = "EE", nstartR = 1)
fit <- Eigen.HMM_fit(Y = Y, init.par = init, nThreads = 1)
atp <- atp.MVT(Y = Y, M = fit[["results"]][[1]][[1]][[1]][["M"]],
              U = fit[["results"]][[1]][[1]][[1]][["U"]],
              V = fit[["results"]][[1]][[1]][[1]][["V"]],
              class = fit[["results"]][[1]][[1]][[1]][["class"]],
              epsilon = 0.99)
which(atp==1)
which(simData2[["atp.tr"]]==1)

[Package MatrixHMM version 1.0.0 Index]