Impose the consistency of the count of unstable eigenvalues...
... Between stoch_simul and check. Added sdim (the number of stable eigenvalues) and edim (the complementary number of explosive eigenvalues) in dr structure. The test is always done with sdim (or edim) returned by mjdgges.time-shift
parent
fa15c3dbc7
commit
8f53be2a6f
|
@ -3729,6 +3729,9 @@ the square submatrix of the right Schur vectors corresponding to the
|
|||
forward looking variables (jumpers) and to the explosive eigenvalues
|
||||
must have full rank.
|
||||
|
||||
Note that the outcome may be different from what would be suggested by
|
||||
@code{sum(abs(oo_.dr.eigval))} when eigenvalues are very close to @ref{qz_criterium}.
|
||||
|
||||
@optionshead
|
||||
|
||||
@table @code
|
||||
|
@ -4348,6 +4351,7 @@ exogenous variables are made available in @code{oo_.exo_simul}
|
|||
(@pxref{oo_.exo_simul}). Default: @code{0}.
|
||||
|
||||
@item qz_criterium = @var{DOUBLE}
|
||||
@anchor{qz_criterium}
|
||||
Value used to split stable from unstable eigenvalues in reordering the
|
||||
Generalized Schur decomposition used for solving 1^st order
|
||||
problems. Default: @code{1.000001} (except when estimating with
|
||||
|
|
|
@ -78,7 +78,6 @@ end
|
|||
|
||||
eigenvalues_ = dr.eigval;
|
||||
[m_lambda,i]=sort(abs(eigenvalues_));
|
||||
n_explod = nnz(abs(eigenvalues_) > options.qz_criterium);
|
||||
|
||||
% Count number of forward looking variables
|
||||
if ~options.block
|
||||
|
@ -91,7 +90,7 @@ else
|
|||
end
|
||||
|
||||
result = 0;
|
||||
if (nyf == n_explod) && (dr.full_rank)
|
||||
if (nyf == dr.edim) && (dr.full_rank)
|
||||
result = 1;
|
||||
end
|
||||
|
||||
|
@ -101,7 +100,7 @@ if options.noprint == 0
|
|||
disp(sprintf('%16s %16s %16s\n','Modulus','Real','Imaginary'))
|
||||
z=[m_lambda real(eigenvalues_(i)) imag(eigenvalues_(i))]';
|
||||
disp(sprintf('%16.4g %16.4g %16.4g\n',z))
|
||||
disp(sprintf('\nThere are %d eigenvalue(s) larger than 1 in modulus ', n_explod));
|
||||
disp(sprintf('\nThere are %d eigenvalue(s) larger than 1 in modulus ', dr.edim));
|
||||
disp(sprintf('for %d forward-looking variable(s)',nyf));
|
||||
skipline()
|
||||
if result
|
||||
|
|
|
@ -202,6 +202,9 @@ else
|
|||
return
|
||||
end
|
||||
|
||||
dr.sdim = sdim; % Number of stable eigenvalues.
|
||||
dr.edim = length(dr.eigval)-sdim; % Number of exposive eigenvalues.
|
||||
|
||||
nba = nd-sdim;
|
||||
|
||||
if task==1
|
||||
|
|
|
@ -140,6 +140,8 @@ end
|
|||
|
||||
if options.block
|
||||
[dr,info,M,options,oo] = dr_block(dr,check_flag,M,options,oo);
|
||||
dr.edim = nnz(abs(dr.eigval) > options.qz_criterium);
|
||||
dr.sdim = dr.nd-dr.edim;
|
||||
else
|
||||
[dr,info] = stochastic_solvers(dr,check_flag,M,options,oo);
|
||||
end
|
||||
|
|
|
@ -232,10 +232,11 @@ if M_.maximum_endo_lead == 0
|
|||
end
|
||||
dr.eigval = eig(kalman_transition_matrix(dr,nstatic+(1:nspred),1:nspred,M_.exo_nbr));
|
||||
dr.full_rank = 1;
|
||||
if any(abs(dr.eigval) > options_.qz_criterium)
|
||||
dr.edim = nnz(abs(dr.eigval) > options_.qz_criterium);
|
||||
dr.sdim = nd-dr.edim;
|
||||
if dr.edim
|
||||
temp = sort(abs(dr.eigval));
|
||||
nba = nnz(abs(dr.eigval) > options_.qz_criterium);
|
||||
temp = temp(nd-nba+1:nd)-1-options_.qz_criterium;
|
||||
temp = temp(dr.sdim+1:nd)-1-options_.qz_criterium;
|
||||
info(1) = 3;
|
||||
info(2) = temp'*temp;
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue