Fit Markov-switching dynamic regression model to data
estimates parameters of the Markov-switching dynamic regression model EstMdl
= estimate(Mdl
,Mdl0
,Y
)Mdl
. estimate
fits the model to the response data Y
, and initializes the estimation procedure by treating the parameter values of the fully specified Markov-switching dynamic regression model Mdl0
as initial values. estimate
uses a version of the expectation-maximization (EM) algorithm described by Hamilton [3].
uses additional
options specified by one or more name-value pair arguments. For example, EstMdl
= estimate(Mdl
,Mdl0
,Y
,Name,Value
)'IterationPlot',true
displays a plot of the loglikelihood versus the iteration step, after the algorithm terminates.
In [4], Hamilton cautions: "Although a researcher might be tempted to use the most general specification possible, with all the parameters changing across a large number of regimes...in practice this is usually asking more than the data can deliver." Hamilton recommends model parsimony and selective estimation, to "limit the focus to a few of the most important parameters that are likely to change."
Data-generating processes with low variances can lead to difficulties in state inference and subsequent parameter estimation. In such cases, consider scaling the data. The variance scales quadratically.
estimate
implements a version of the EM algorithm described in [2], [3], and [4]. Given an initial estimate of model parameters Mdl0
, estimate
iterates the following process until convergence:
Expectation step — estimate
applies smooth
to the data to obtain inferences of latent state probabilities at each time step and an estimate of the overall data loglikelihood.
Maximization step — estimate
uses the expected smoothed probabilities from the expectation step to weight the data before updating parameter estimates in each submodel.
Likelihood surfaces for the mixture densities of switching models can contain local maxima and singularities [2]. If so, the largest local maximum with a nonzero model variance is considered the maximum likelihood estimate (MLE). If Mdl0
is in the neighborhood of the MLE, estimate
typically converges to it, but this convergence is not guaranteed.
estimate
handles two types of constraints:
Constraints on submodel parameters, which the estimate
object function of the varm
object enforces at each maximization step
Constraints on transition probabilities, which estimate
enforces by projecting a maximal estimate of the transition matrix onto the constrained parameter space after each iteration
Constraints on submodel innovations variances and covariances are unsupported. estimate
computes innovations covariances after estimation, regardless of their values.
[1] Chauvet, M., and J. D. Hamilton. "Dating Business Cycle Turning Points." In Nonlinear Analysis of Business Cycles (Contributions to Economic Analysis, Volume 276). (C. Milas, P. Rothman, and D. van Dijk, eds.). Amsterdam: Emerald Group Publishing Limited, 2006.
[2] Hamilton, J. D. "Analysis of Time Series Subject to Changes in Regime." Journal of Econometrics. Vol. 45, 1990, pp. 39–70.
[3] Hamilton, James. D. Time Series Analysis. Princeton, NJ: Princeton University Press, 1994.
[4] Hamilton, J. D. "Macroeconomic Regimes and Regime Shifts." In Handbook of Macroeconomics. (H. Uhlig and J. Taylor, eds.). Amsterdam: Elsevier, 2016.
[5] Kole, E. "Regime Switching Models: An Example for a Stock Market Index." Rotterdam, NL: Econometric Institute, Erasmus School of Economics, 2010.