Hello. I’m trying to estimate linear DSGE and linear NK models with the zero lower bound in the sample, but I’m having some difficulty figuring out how to properly do this. I’ve seen some suggest doing this by incorporating a second shock to the Taylor Rule (Laseen & Svensson, 2011 IJCB), but I cannot find examples of how to do this in Dynare. Other ZLB estimations (Atkinson et al, 2019 JME; Guerrieri & Iacoviello, 2017) only use nonlinearized models. Can someone please help point me in the right direction on how to do this, or if this is possible, in Dynare?
I am not sure I understand the problem. The Occbin-type implementations as e.g. tests/occbin/filter/NKM.mod · master · Dynare / dynare · GitLab would work with a linearized model as well. Internally, Dynare does linearized these equations as well.
Thank you for your help here, Professor! I’ve made some progress with this thanks to your example file, but am still running into issues. I’m trying to implement and estimate the ZLB in the Smets and Wouters (2007) model. I’m now receiving the error message that the estimation does not converge, regardless of whether I use the inversion filter or Kalman filter. Perhaps I have declared my lower-bound wrong when taken with the observation equations? The error message is below, and my .mod file and dataset are attached.
sw07_0719_ff.mod (21.3 KB)
swdata_ff1.mat (14.6 KB)
nperiods has been endogenously increased up to 229.
Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 3.432965e-17.
In occbin.mkdatap_anticipated_dyn (line 104)
In occbin.solve_one_constraint (line 175)
In occbin.solver (line 63)
In occbin.kalman_update_algo_1 (line 124)
In missing_observations_kalman_filter (line 235)
In dsge_likelihood (line 705)
In gmhmaxlik_core (line 154)
In gmhmaxlik (line 100)
In dynare_minimize_objective (line 336)
In dynare_estimation_1 (line 211)
In dynare_estimation (line 118)
In sw07_0719_ff.driver (line 671)
In dynare (line 281)
occbin solver:: period 1::
Did not converge – increase maxit.
Error using print_info (line 32)
Occbin: Simulation did not converge, increase maxit or check_ahead_periods.
Could you maybe provide the full log-file? I am still investigating the issue.
Certainly, thank you again! The full log file is below.
sw07_0719_ff.log (85.3 KB)
How long did your code run, before the error occurred?
My code ran for about 8.5 hours before the error occurred.
This is due to a bug. See Provide error handling to piece-wise linear Kalman filter (#1854) · Issues · Dynare / dynare · GitLab
Thank you for providing the fix to the bug! I’m now running into a new error message with the same above code. It says the matrix is singular or badly scaled, though I haven’t changed any of the parameters from their original calibration. Perhaps I have declared the ZLB incorrectly?
The Matlab error says “Assignment between unlike types is not allowed” though I am admittedly unsure what this means. Thanks for your help so far, and any further help or guidance you can provide is certainly appreciated!
sw07_0719_ff.log (83.7 KB)
Could you maybe provide the full error message?