Hi,
I have a problem with the mod-file at http://www.dynare.org/phpBB3/viewtopic.php?f=1 http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=10760 &t=10760
I narrowed the problem down to a problem with lyapunov_symm.m
When you try the code
load workspace_dsge_simulated_theoretical_correlation
tmp = th_autocovariances(dr,ivar,M_,options_,nodecomposition);
tmp{5,1}
with the attached mat-file, you will see that the covariance matrix at lag 5 is complex, causing the subsequent crash the user reports.
The reason is that
[vx, u] = lyapunov_symm(A,B*M_.Sigma_e*B',options_.lyapunov_fixed_point_tol,options_.q z_criterium,options_.lyapunov_complex_threshold,[],[],options_.debug);
returns an vx matrix with a big negative eigenvalue, which should never happen. However, that matrix actually solves the Lyapunov equation. It simply is not a valid covariance matrix. How should we deal with an issue like this?
Best,
Johannes
Hi Johannes,
this model is non-stationary but options_.qz_criterium = 0.999999 ....
I'm on the train and can't get the original model to understand why.
Best
Michel
Johannes Pfeifer writes:
Hi,
I have a problem with the mod-file at http://www.dynare.org/phpBB3/viewtopic.php?f=1 http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=10760 &t=10760
I narrowed the problem down to a problem with lyapunov_symm.m
When you try the code
load workspace_dsge_simulated_theoretical_correlation
tmp = th_autocovariances(dr,ivar,M_,options_,nodecomposition);
tmp{5,1}
with the attached mat-file, you will see that the covariance matrix at lag 5 is complex, causing the subsequent crash the user reports.
The reason is that
[vx, u] =
lyapunov_symm(A,B*M_.Sigma_e*B',options_.lyapunov_fixed_point_tol,options_.q z_criterium,options_.lyapunov_complex_threshold,[],[],options_.debug);
returns an vx matrix with a big negative eigenvalue, which should never happen. However, that matrix actually solves the Lyapunov equation. It simply is not a valid covariance matrix. How should we deal with an issue like this?
Best,
Johannes
Dev mailing list Dev@dynare.org https://www.dynare.org/cgi-bin/mailman/listinfo/dev
Hi, the original model is fine. It is about that particular parameter draw. But now that you mention it, I wonder why it got accepted in the first place. I will investigate further. Thanks
Am 27.10.2016 um 07:45 schrieb Michel Juillard:
Hi Johannes,
this model is non-stationary but options_.qz_criterium = 0.999999 ....
I'm on the train and can't get the original model to understand why.
Best
Michel
Johannes Pfeifer writes:
Hi,
I have a problem with the mod-file at http://www.dynare.org/phpBB3/viewtopic.php?f=1 http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=10760 &t=10760
I narrowed the problem down to a problem with lyapunov_symm.m
When you try the code
load workspace_dsge_simulated_theoretical_correlation
tmp = th_autocovariances(dr,ivar,M_,options_,nodecomposition);
tmp{5,1}
with the attached mat-file, you will see that the covariance matrix at lag 5 is complex, causing the subsequent crash the user reports.
The reason is that
[vx, u] =
lyapunov_symm(A,B*M_.Sigma_e*B',options_.lyapunov_fixed_point_tol,options_.q z_criterium,options_.lyapunov_complex_threshold,[],[],options_.debug);
returns an vx matrix with a big negative eigenvalue, which should never happen. However, that matrix actually solves the Lyapunov equation. It simply is not a valid covariance matrix. How should we deal with an issue like this?
Best,
Johannes
Dev mailing list Dev@dynare.org https://www.dynare.org/cgi-bin/mailman/listinfo/dev
Hi Michel, it turns out there is a bug in mjdgges.mex that is responsible for the strange behavior. The value set for qz_criterium is ignored in the mex-file and qz_criterium=1+1e-6 is always used. That is the reason the unstable draws are not correctly rejected. Houtan is already working on it.
Am 27.10.2016 um 10:17 schrieb Johannes Pfeifer:
Hi, the original model is fine. It is about that particular parameter draw. But now that you mention it, I wonder why it got accepted in the first place. I will investigate further. Thanks
Am 27.10.2016 um 07:45 schrieb Michel Juillard:
Hi Johannes,
this model is non-stationary but options_.qz_criterium = 0.999999 ....
I'm on the train and can't get the original model to understand why.
Best
Michel
Johannes Pfeifer writes:
Hi,
I have a problem with the mod-file at http://www.dynare.org/phpBB3/viewtopic.php?f=1 http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=10760 &t=10760
I narrowed the problem down to a problem with lyapunov_symm.m
When you try the code
load workspace_dsge_simulated_theoretical_correlation
tmp = th_autocovariances(dr,ivar,M_,options_,nodecomposition);
tmp{5,1}
with the attached mat-file, you will see that the covariance matrix at lag 5 is complex, causing the subsequent crash the user reports.
The reason is that
[vx, u] =
lyapunov_symm(A,B*M_.Sigma_e*B',options_.lyapunov_fixed_point_tol,options_.q
z_criterium,options_.lyapunov_complex_threshold,[],[],options_.debug);
returns an vx matrix with a big negative eigenvalue, which should never happen. However, that matrix actually solves the Lyapunov equation. It simply is not a valid covariance matrix. How should we deal with an issue like this?
Best,
Johannes
Dev mailing list Dev@dynare.org https://www.dynare.org/cgi-bin/mailman/listinfo/dev
Dev mailing list Dev@dynare.org https://www.dynare.org/cgi-bin/mailman/listinfo/dev
The bug was that the qz criterium was not considered if a fourth argument was passed to mjdgges.
Looking at the function, I wonder why line 130 tests for mxGetM(prhs[2]) > 0 instead of mxGetM(prhs[2]) == 1 && mxIsNumeric(prhs[2]). In the current setup, you can pass a non-numeric array to mjdgges.
Best, Houtan
On Oct 27, 2016, at 11:08, Johannes Pfeifer jpfeifer@gmx.de wrote:
Hi Michel, it turns out there is a bug in mjdgges.mex that is responsible for the strange behavior. The value set for qz_criterium is ignored in the mex-file and qz_criterium=1+1e-6 is always used. That is the reason the unstable draws are not correctly rejected. Houtan is already working on it.
Am 27.10.2016 um 10:17 schrieb Johannes Pfeifer:
Hi, the original model is fine. It is about that particular parameter draw. But now that you mention it, I wonder why it got accepted in the first place. I will investigate further. Thanks
Am 27.10.2016 um 07:45 schrieb Michel Juillard:
Hi Johannes,
this model is non-stationary but options_.qz_criterium = 0.999999 ....
I'm on the train and can't get the original model to understand why.
Best
Michel
Johannes Pfeifer writes:
Hi,
I have a problem with the mod-file at http://www.dynare.org/phpBB3/viewtopic.php?f=1 http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=10760 &t=10760
I narrowed the problem down to a problem with lyapunov_symm.m
When you try the code
load workspace_dsge_simulated_theoretical_correlation
tmp = th_autocovariances(dr,ivar,M_,options_,nodecomposition);
tmp{5,1}
with the attached mat-file, you will see that the covariance matrix at lag 5 is complex, causing the subsequent crash the user reports.
The reason is that
[vx, u] =
lyapunov_symm(A,B*M_.Sigma_e*B',options_.lyapunov_fixed_point_tol,options_.q z_criterium,options_.lyapunov_complex_threshold,[],[],options_.debug);
returns an vx matrix with a big negative eigenvalue, which should never happen. However, that matrix actually solves the Lyapunov equation. It simply is not a valid covariance matrix. How should we deal with an issue like this?
Best,
Johannes
Dev mailing list Dev@dynare.org https://www.dynare.org/cgi-bin/mailman/listinfo/dev
Dev mailing list Dev@dynare.org https://www.dynare.org/cgi-bin/mailman/listinfo/dev
Dev mailing list Dev@dynare.org https://www.dynare.org/cgi-bin/mailman/listinfo/dev