#86: check matrix power used in forecast --------------------------+------------------------------------------------- Reporter: michel | Owner: Type: enhancement | Status: new Priority: minor | Milestone: Component: Core M-files | Version: Keywords: | --------------------------+------------------------------------------------- taking large matrix power in forecast step of the Kalman smoother routines is expensive, but probably more accurate than recursive multiplications. - investigate more accuracy issue - factorise matrix decomposition for matrix power
#86: check matrix power used in forecast ---------------------------+------------------------------------------------ Reporter: michel | Owner: Type: enhancement | Status: new Priority: minor | Milestone: Component: Core M-files | Version: Resolution: | Keywords: ---------------------------+------------------------------------------------
Comment(by stepan):
Here is a matlab script to evaluate the accuracy and speed of forecasts computations in dynare's smoother files. The recursive approach may be interpreted as an Horner scheme (recursive evaluation of polynomials). It is well known that the Horner scheme is ill behaved if the roots of the polynomial to be evaluated are outside the unit circle. In our case the eigenvalues of the transition matrix are smaller or equal to one. If we have eigenvalues close to or equal to one, the propagation of numerical errors may cause accuracy problems.
My experience with the attached matlab script file is that the recursive approach is much faster than the power approach (even if the transition matrix is factorized) '''and that the differences are not significant'''.
Limitations of my experience: * I do not consider the case of complex eigenvalues. I don't think that this is a real problem here (I may be wrong). * By construction I assume that we can diagonalize the transition matrix. * The stable eigenvalues are uniformly distributed.
#86: check matrix power used in forecast ---------------------------+------------------------------------------------ Reporter: michel | Owner: stepan Type: enhancement | Status: assigned Priority: minor | Milestone: 4.2 Component: Core M-files | Version: Resolution: | Keywords: ---------------------------+------------------------------------------------ Changes (by sebastien):
* owner: => stepan * status: new => assigned * milestone: => 4.2
#86: check matrix power used in forecast ---------------------------+------------------------------------------------ Reporter: michel | Owner: stepan Type: enhancement | Status: assigned Priority: minor | Milestone: 4.3 Component: Core M-files | Version: Resolution: | Keywords: ---------------------------+------------------------------------------------ Changes (by stepan):
* milestone: 4.2 => 4.3
#86: check matrix power used in forecast --------------------------+------------------------------------------------- Reporter: michel | Owner: stepan Type: enhancement | Status: closed Priority: minor | Milestone: 4.3 Component: General | Version: Resolution: fixed | Keywords: --------------------------+------------------------------------------------- Changes (by sebastien):
* status: assigned => closed * resolution: => fixed