If there were more than 10 files of Metropolis parameter draws, the ordering
the files containing the posterior moments could be different from that of the
parameter draws. This is because the “dir()” command was used to order the
files containing the parameter draws, and because the command uses alphabetic
ordering, file #10 would come before #2.
This commit enforces the numerical ordering of files.
The 'stable' option of intersect(), which keeps the element order of the first
argument, is not available on Octave. Provide a fallback implementation, and
adapt the code.
When removing globals in 24cd423671 the call to set_parameters.m, which relies on M_ being global, was not removed. The problem arises
1. When computing second moments for big models with drsize*SampleSize>MaxMegaBytes (in which case decision rules dr were not saved, but recomputed)
2. When computing the conditional variance decomposition for all models regardless of size (dsge_simulated_theoretical_conditional_variance_decomposition.m relied on the wrong M_.Sigma_e in this case)
If all variables contain unit roots, dsge_simulated_theoretical_variance_decomposition.m crashes because tmp is NaN. Instead, the first draw is now checked for a unit root and a warning is displayed.
of second order moments and variance decompositions.
+ Changed calls to dsge_simulated_theoretical_* functions.
+ Fixed headers.
+ Cosmetic changes.
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2759 ac1d8469-bf42-47a9-8791-bf33cf982152