Skip to content
Snippets Groups Projects
Commit 9d67555f authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Fix bug in the output of stoch_simul: in the presence of non-stationary...

Fix bug in the output of stoch_simul: in the presence of non-stationary variables, and when selecting only a subset of variables for the output, the "NaN"s in the "mean" column where wrongly placed
parent eb8d0b29
No related merge requests found
......@@ -37,9 +37,7 @@ end
[oo_.gamma_y,stationary_vars] = th_autocovariances(dr,ivar,M_,options_);
m = dr.ys(ivar);
non_stationary_vars = setdiff(1:length(ivar),stationary_vars);
ivar1 = intersect(non_stationary_vars,ivar);
m(ivar1) = NaN;
m(non_stationary_vars) = NaN;
i1 = find(abs(diag(oo_.gamma_y{1})) > 1e-12);
s2 = diag(oo_.gamma_y{1});
......
......@@ -19,13 +19,12 @@ function [Gamma_y,stationary_vars] = th_autocovariances(dr,ivar,M_,options_,node
% Gamma_y{nar+2} [double] Variance decomposition.
% Gamma_y{nar+3} [double] Expectation of the endogenous variables associated with a second
% order approximation.
% stationary_vars [integer] Vector of indices of stationary
% variables in declaration order
% stationary_vars [integer] Vector of indices of stationary variables (as a subset of 1:length(ivar))
%
% SPECIAL REQUIREMENTS
%
% Copyright (C) 2001-2009 Dynare Team
% Copyright (C) 2001-2010 Dynare Team
%
% This file is part of Dynare.
%
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment