© Copyright 2000-2020 Source Code Online. Free Source Code and Scripts Downloads.
|Code Listing by Marco B|
This function infers the unobserved regimes and provides estimates for the parameters of a Gaussian mixture with two states using the EM algorithm.
Exact references to the relevant equations from Hamilton (1994), Chapter 22 can be found in the procedure.
Any Tx1 data vector can be fed into the function.
The function performs a nonlinear, constrained optimization to find a positive semi-definite matrix that is closest (2-norm) to a symmetric matrix that is not positive semi-definite which the user provides to the function. The optimization is...
This function generates a fan chart. A fan chart aims to visualize the uncertainty that surrounds a sequence of point forecasts.
The function can be provided with a series of density forecasts and historical data.