Skip to contents

The S4 class of the higher order multivariate Markov chains of Ching, Ng and Fung (2008), fitted by fitHighOrderMultivarMC(): the distribution of the next state of each of \(s\) sequences is a weighted sum, over the sequences and the lags, of transition matrices applied to their past states.

Slots

order

The order of the chain (number of lags).

states

The states, common to all the sequences.

P

A three-dimensional array of \(s^2\) times order transition matrices, one for each pair of sequences and lag.

Lambda

The weights of the matrices in P, in the same order.

byrow

Logical: are the matrices stochastic by rows (TRUE) or by columns (FALSE, as returned by fitHighOrderMultivarMC())?

name

Optional name of the object.

References

Ching, W.-K., Ng, M. K. and Fung, E. S. (2008). Higher-order multivariate Markov chains and their applications. Linear Algebra and its Applications 428(2-3), 492-507. doi:10.1016/j.laa.2007.05.021

Author

Giorgio Spedicato, Deepak Yadav

Examples

statesName <- c("a", "b")

P <- array(0, dim = c(2, 2, 4), dimnames = list(statesName, statesName))
P[,,1] <- matrix(c(0, 1, 1/3, 2/3), byrow = FALSE, nrow = 2)
P[,,2] <- matrix(c(1/4, 3/4, 0, 1), byrow = FALSE, nrow = 2)
P[,,3] <- matrix(c(1, 0, 1/3, 2/3), byrow = FALSE, nrow = 2)
P[,,4] <- matrix(c(3/4, 1/4, 0, 1), byrow = FALSE, nrow = 2)

Lambda <- c(0.8, 0.2, 0.3, 0.7)

ob <- new("hommc", order = 1, states = statesName, P = P, 
          Lambda = Lambda, byrow = FALSE, name = "FOMMC")