@Pfeifer Appreciate your feedback
Many thanks indeed. Much appreciated.
With regards the second part I am referring to the state-state representation where the attached memo explains how dynare obtains the state equation however the second policy function y=g(x,sigma) is not covered. My question was y vector contains what variables ? All endogenous
TechnicalMemo_State space representation of a model implemented in Dynare_IngvarStrid_170227.pdf (605.5 KB)
State space representations with observation equations are typically considered in the context of estimation. The variables in the observation equation are all objects for which you have data.
Many thanks prof. @Pfeifer
Regarding the first error I am facing , I suspect the issue might have risen due to the fact that: Lagrange multiplier of the binding constraint mu, does not shows up under relax case but enters the FOC when the constraint is bind.
Given the fact that I did not declare mu as an endogenous var nor give it an initial value under steady state block would have triggered this error ?
Sorry I am just trying to figure out the problem.
There seems to be a bug triggering the error message: Fix treatment of complex residuals in static models (#117) · Issues · Dynare / preprocessor · GitLab. That being said, your model looks wrong. You have
( (1+tauu)*(-N)^(deltaa-1) )^(-1/etaa+1)
With N being positive, you will be taking a fractional exponent of a negative number.
Thanks a million Prof. , will fix it and see how it goes.
Hello again Prof.
After I fixed the bug in the equation you have pointed out, I was able to find the steady state and run some simulations, however, I run into the difficulty of the constraint is never binding.
Although I amended the Occasionally binding constraint to bind when D = -0.1*GDP (where D denotes debt with negative values if borrowing), D surpasses -18 and the constraint did not bind as the figure below shows. (attached the results of the simulation results). Both D and GDP should remain at the levels attained when the shocks was triggered.
Any suggestions prof ? and Thank you for time.
occ.mod (6.3 KB)
Shock.fig (301.2 KB)
Can you check whether your model works in the non-binding regime as expected? I am getting only NaN in OccBin due to the decision rules having numerical overflow.
Hello Again prof,
Yes, it seems to me that under non-binding regime results are reasonable. I have initiated a productivity stock (Attached below) where GDP increased and then gradually reverted to steady state levels (pre shock level).
Also, just a little reminder that in the previous shock (interest rate) which I have raised in my previous inquiry, oo_occbin.simul.regime_history which in my understanding documents whether dynare switched to another regime did not document any switch to binding case.
Best and many thanks prof.
occ.mod (6.3 KB)
@jpfeifer any update prof.?
When I run your posted file, I still get
Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 3.022061e-18.
In dyn_first_order_solver (line 256)
In stochastic_solvers (line 249)
In resol (line 114)
In occbin.solver (line 61)
In occ2.driver (line 678)
In dynare (line 282)
That’s what is puzzling me.
@jpfeifer Btw I am getting the same warning on my side for all exogenous shocks. Does this suggests that the model has bugs in terms of FOC equations or it could be other reasons ?
Thank you prof.
My hunch is a problem with the FOCs.
Many thanks prof. Will go over the FOC. But couldn’t be an issue of numeric computation whereby regularization of a matrix that causing the problem might solve the issue or Dynare does that automatically?
Also are you aware prof of any replication of Mendoza 2002 sudden stop model for reference?
It could just be a numerical issue and occasionally it is. Unfortunately I am not aware of any replications of that paper.
Appreciate all your help prof.
Sorry I am referring to this (attached) version error msgs. As I have amended some FOC which has led to the disappearance of some errors. Namely the error msgs now is:
Error using print_info
The Jacobian contains NaNs. For more information, use options_.debug.
Error in check (line 48)
print_info(info, 0, options);
Error in occ.driver (line 338)
oo_.dr.eigval = check(M_,options_,oo_);
Error in dynare (line 281)
Is it still the same old numerical error ? If yes then how Can I access the matrices as debuging does not seems useful in locating the ill-conditioned matrices.
Best and thank you for your time.
occ.mod (6.6 KB)
No, this comes from the fact that your detected steady state makes no sense.
Z3 is negative, which makes for a complex-valued steady state.