Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix dsge_simulated_theoretical_variance_decomposition.m for non-stationa... #691
@stepan-a The issue here was that for all other second moments one gets NaN for unit roots, but the decomposition array was empty. This led to a crash. I agree that defining it sooner would be better. But for now I would prefer this short-term fix, because this seems like a bigger issue and I dislike Dynare crashing without warning for now.
When dealing with this broader issue, we should also think about how to detect this issue in the first place. My check here depends on the first draw. However, it is conceivable that someone has a model where some draws have unit roots and some do not. In this case, we might even want to allow for a NaN matrix for the decomposition, because the percentiles might be well-defined.
Or shall we postpone this issue?