mmcx | R Documentation |
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).
mmcx(y, x, initial, ...)
y |
matrix of categorical data sequences |
x |
matrix of covariates |
initial |
numerical vector of initial values. |
... |
additional arguments to be passed down to |
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.
Carolina Vasconcelos and Bruno Damásio
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. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1093/imaman/13.3.187")}
Optimization is done through auglag()
.
data(stockreturns)
s <- cbind(stockreturns$sp500, stockreturns$djia)
x <- stockreturns$spread_1
mmcx(s, x, initial = c(1, 1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.