Solver matrix (close to) singular: how to troubleshoot

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

Solver matrix (close to) singular: how to troubleshoot

Postby ryoanji » Tue Dec 06, 2016 8:54 pm

I am new to Dynare and have been very impressed with its capabilities. At the moment, I am trying to replicate the results in Aoki Benigno Kiyotaki (2016) Monetary and Financial Policies in EMEs working paper. Since I am still learning a lot, I decided to go slow: from simple to more complex. I am trying to replicate the basic closed economy model in their set-up, then add sticky prices, then open up the economy, then add "bankers." I am fine with former, but when I add Rotemberg's sticky prices equations, I am running into a lot of problems.

1. Steady state solver reaches maxit and fails to converge.
Impossible to find the steady state. Either the model doesn't have a steady state, there are an infinity of steady states,
or the guess values are too far from the solution

Error in steady (line 92)
print_info(info,options_.noprint, options_);


2. When I specify steady_state_model, everything goes throw but I get a warning:
Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 7.653498e-20.

and IRFs are explosive
stoch_simul:: The simulations conducted for generating IRFs to eA were explosive.
stoch_simul:: No IRFs will be displayed. Either reduce the shock size,
stoch_simul:: use pruning, or set the approximation order to 1.


that is with second order perturbation, when I drop the order to 1, I get matrix singularity
One of the eigenvalues is close to 0/0 (the absolute value of numerator and denominator is smaller than 1e-06!
If you believe that the model has a unique solution you can try to reduce the value of qz_zero_threshold.



How would suggest me to troubleshoot this? What I am doing appears to be quite standards and I am just replicating paper. I don't thing it is just the model's steady state that is problematic here.

Thank you so much in advance for your help. I hope that with time, I could contribute to this great forum as well!

p.s. here is the link to the paper:
https://www.princeton.edu/~kiyotaki/pap ... 4-2016.pdf
Attachments
abk_replic_Rotemberg.mod
(3.38 KiB) Downloaded 90 times
abk_replic_no_Rotemberg.mod
(2.45 KiB) Downloaded 83 times
ryoanji
 
Posts: 1
Joined: Thu Dec 01, 2016 4:50 am

Re: Solver matrix (close to) singular: how to troubleshoot

Postby jpfeifer » Fri Dec 09, 2016 9:36 am

Hi,
there must be fundamental singularity problem in your model. You can forget about all other problems, they are just symptoms. If you run model_diagnostics, you get
Code: Select all
MODEL_DIAGNOSTICS:  The Jacobian of the static model is singular
MODEL_DIAGNOSTICS:  there is 1 colinear relationships between the variables and the equations
Colinear variables:
L
w
Y
C
K
I
mc
pi
Colinear equations
     1     5     6     7
MODEL_DIAGNOSTICS:  The presence of a singularity problem typically indicates that there is one
MODEL_DIAGNOSTICS:  redundant equation entered in the model block, while another non-redundant equation
MODEL_DIAGNOSTICS:  is missing. The problem often derives from Walras Law.

Focus on those equations.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Solver matrix (close to) singular: how to troubleshoot

Postby alex2836 » Tue Feb 14, 2017 5:22 pm

Hi ryoanji,
I looked at your code. I think you need to specify a monetary policy rule to pin down "pi", in addition to the NKPC. See the last equation in the paper. Right now, I can combine your equation 6 and 7 together and make the system with more endogenous variables than equations (i.e. 11 endo var versus 10 non-redundant equations). I think this is where your singularity problem coming from.
Hope this helps.
alex2836
 
Posts: 1
Joined: Mon Feb 13, 2017 10:53 pm


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 9 guests