mmcx {GenMarkov} | R Documentation |
Non-homogeneous Multivariate Markov Chains
Description
Estimates Multivariate Markov Chains that depend on a exogeneous variables. The model is based on the Mixture Transition Distribution model, and considers non-homogeneous Markov Chains, instead of homogeneous Markov Chains as in Raftery (1985).
Usage
mmcx(y, x, initial, ...)
Arguments
y |
matrix of categorical data sequences |
x |
matrix of covariates |
initial |
numerical vector of initial values. |
... |
additional arguments to be passed down to |
Value
The function returns a list with the parameter estimates, standard-errors, z-statistics, p-values and the value of the log-likelihood function, for each equation.
Author(s)
Carolina Vasconcelos and Bruno Damásio
References
Raftery, A. E. (1985). A Model for High-Order Markov Chains. Journal of the Royal Statistical Society. Series B (Methodological), 47(3), 528-539. http://www.jstor.org/stable/2345788
Ching, W. K., E. S. Fung, and M. K. Ng (2002). A multivariate Markov chain model for categorical data sequences and its applications in demand predictions. IMA Journal of Management Mathematics, 13(3), 187-199. doi:10.1093/imaman/13.3.187
See Also
Optimization is done through auglag()
.
Examples
data(stockreturns)
s <- cbind(stockreturns$sp500, stockreturns$djia)
x <- stockreturns$spread_1
mmcx(s, x, initial = c(1, 1))