Dear professor Pfeifer,
I built a two country monetary union, two sector, two household (saver/borrower) model similar to Quint and Rabanal 2013 found at imf.org/external/pubs/ft/wp … p13209.pdf. The main difference with my code is that the bonds market for savers is not international. Savers can only place deposits with domestic financial intermediaries.
When I simulate the model I get the following message:
[quote]Warning: Matrix is singular to working precision.
In evaluate_steady_state at 85
In resol at 104
In stoch_simul at 88
In Test at 777
In dynare at 180
Error using print_info (line 80)
The steady state contains NaN or Inf
Error in stoch_simul (line 98)
print_info(info, options_.noprint, options_);
Error in Test (line 777)
info = stoch_simul(var_list_);
Error in dynare (line 180)
evalin(‘base’,fname) ;
[/quote]
Do you have any tips on what might be causing this problem? I’ve gone over the code countless times and compared it with similar codes but am still unable to find what’s wrong. Thank you in advance
Best,
Daniel
Test.mod (9.36 KB)
The problem is that your equation 50 is not linear. You can see this when using
which shows a non-zero residual, which is usually incompatible with
Thank you very much for the reply! I fixed the issue with equation 50 and added 2 equations relating to the current account in order to obtain a stationary and well-defined steady state (an interest rate differential between domestic and EMU wide and the evolution of foreign net assets). If I simulate the model I’m able to obtain IRFs but I still get the error:
model_diagnostic: the Jacobian of the static model is singular
there is 6 colinear relationships between the variables and the equations.
...
The presence of a singularity problem typically indicates that there is one
redundant equation entered in the model block, while another non-redundant equation
is missing. The problem often derives from Walras Law.
Do you know how best to identify this redundant equation and which non-redundant equation is missing?
Thank you in advance for your help.
Kind regards,
Daniel
Test3.mod (9.57 KB)
Your model is still not properly linearized.
//Total Consumption
(lambda*cS+(1-lambda)*cB)*c=lambda*CS*cS+(1-lambda)*CB*cB;
for example has a product of cS and c. The same in
//Total Consumption
(lambdastar*cSstar+(1-lambdastar)*cBstar)*cstar=lambdastar*CSstar*cSstar+(1-lambdastar)*CBstar*cBstar;
Regarding the “error” it is actually a warning that in your case comes from the still existing unit roots.