Page 1 of 1

FSOLVE NOT handling non-square systems;

PostPosted: Thu Jun 04, 2015 10:27 am
by hodabbbb
Hi
I am trying to replicate the Gk2011 model (not linearized)
Although I get some results a get a warning as follows:
---------
Warning: Trust-region-dogleg algorithm of FSOLVE cannot handle non-square systems; using
Levenberg-Marquardt algorithm instead.
--------
Unlike in GK2011 results, in my results I get the positive lending premium falling too quickly to zero (in 2 quarters) and becoming negative (following a negative TFP shock)
Is there any issues with this warning that I could relate to the results ?

Thanks in advance !

Re: FSOLVE NOT handling non-square systems;

PostPosted: Thu Jun 04, 2015 3:07 pm
by federico
are you trying to replicate
"Financial Intermediation and Credit Policy in Business Cycle Analysis" by Gertler and Kiyotaki ?

Re: FSOLVE NOT handling non-square systems;

PostPosted: Fri Jun 05, 2015 8:04 am
by jpfeifer
This is a warning appearing during steady state computation using an external file. If you are talking about a nonlinear model, check whether the detected steady state makes sense (as the steady state might not be unique). If you found the correct steady state, you can ignore the warning message.

Re: FSOLVE NOT handling non-square systems;

PostPosted: Fri Jun 05, 2015 8:16 am
by federico
I run your model using the values obtained from your steady state file as initial guess and i got this warning message when dynare compute the steady state

Warning: Matrix is singular to working precision.
> In trust_region>dogleg at 196
In trust_region at 113
In dynare_solve at 154
In evaluate_steady_state at 194
In resol at 104
In stoch_simul at 82
In NK_GK2 at 507
In dynare at 214

Maybe there is a problem in your model

Re: FSOLVE NOT handling non-square systems;

PostPosted: Tue Jun 09, 2015 3:22 pm
by hodabbbb
Thanks for your answers Administrator (and Federico).

Yes I get steady state results that are fine. They respond well (as expected) when I increase one of e key parameters as well.

The problem is that the impulse response is counterintuitive . there is a suggestion (from friends) that it could be due to this warning that may not generate proper IRFs when model has nonlinear equations (and is not loglinearized).

could that be the case ?
Any suggestions?

Ps. Federico I do not get the problem you report.

Re: FSOLVE NOT handling non-square systems;

PostPosted: Wed Jun 10, 2015 8:38 am
by jpfeifer
The warning comes from the steady state computation when calling
Code: Select all
fun_NK_GK

If the steady state is OK, this is not the source of the problem. However,
Code: Select all
model_diagnostics

reports a singularity problem with your model. You might want to check this out.