HMM Procedure
Overview: HMM Procedure
The HMM procedure supports hidden Markov models (HMMs), which have been widely applied in economics, finance, science, and engineering. The hidden Markov models have many well-known aliases, such as the general state space model (GSSM), regime-switching model (RSM), Markov-switching model (MSM), and Markov regime-switching model (MRSM). PROC HMM supports the finite hidden Markov model (finite HMM), the Poisson hidden Markov model (Poisson HMM), the Gaussian hidden Markov model (Gaussian HMM), the Gaussian mixture hidden Markov model (GM HMM), the regime-switching regression model (RS REG, also known as the regression hidden Markov model or REG HMM), and the regime-switching autoregression model (RS AR, also known as the autoregressive hidden Markov model or AR HMM) in both the standard and mean-adjusted forms.
The HMM procedure supports the following:
cross-sectional time series data
the maximum likelihood (ML) method and the maximum a posteriori (MAP) method for parameter estimation, which is a nonlinear optimization problem
the prior distribution for parameters when you use the MAP method
four types of optimization algorithms: the expectation-maximization (EM) algorithm, the active set algorithm, the interior point algorithm, and the stochastic gradient descent (SGD) algorithm
multistart mode for the active set and interior point optimization algorithms; in this mode, the local solver approaches the problem from multiple starting points, possibly finding a better local optimum as a result. However, the computing cost in multistart mode can be huge.
specification of initial values for optimization
state-independent constraints on parameters
output of parameter estimates to a data table, which can be read back later in order to use those parameter estimates as the initial values for a new estimation
output of the covariance matrix of parameter estimates
specification of the order in which to label the states (and components in the case of GM HMMs) in order to solve the label switching problem, and output of the changes of state labels (and component labels in the case of GM HMMs)
estimation of several models that have different numbers of states or different orders of autoregressive process (or both) in order to help you with the important and difficult task of model selection
output of the filtering, smoothing, and decoding results
output of the mean, standard error, covariance matrix, median, and confidence interval of forecasts of dependent variables
output of the probabilities of states in the forecasts
multistep forecasts after each observation
output of the log likelihood up to any observation
output of the following information criteria: Akaike’s information criterion (AIC), the corrected AIC (AICC), the Bayesian information criterion (BIC), and the Hannan-Quinn criterion (HQC)
saving the model information and using it later to score other new data
the analytic store technology. You can even apply HMMs to new data on a platform that does not support the HMM procedure.
PROC HMM requires SAS Cloud Analytic Services (CAS) in order to run, and it does the following:
enables you to run on a cluster of machines that distribute the data and the computations
exploits all the available cores and concurrent threads