ZLB NK Estimation

Hello all,

I am trying to estimate the New Keynesian model in Clarida, Gali, and Gertler (1999) with a ZLB on US data. The model file I am running consistently gives an error in computing the likelihood for initial parameter values, no matter how I specify the OccBin setup. I think my issue is in the model itself, but I cannot seem to find it. Can someone please point me in the right direction for how to solve this? My model file and data are attached. Thanks!
cgg_data_zlb2.mat (5.2 KB)

cgg_0819_ff_c.mod (4.4 KB)

Do simulations work? The problem within the PKF is:

Occbin: Simulation did not converge, increase maxit or check_ahead_periods

When I run the model with:

shockssequence = randn(100,1);
shocks(surprise,overwrite);
var eps_eta;
periods 1:100;
values (shockssequence);
end;

I get the same error message. I believe there’s a problem with the way I’ve specified the model or its interaction with OccBin, rather than an issue with the estimation. Any help is very appreciated, thanks!

Apologies. When I run a simulation and generate an Occbin graph, I get the graph below.
occbin
cgg_0819_ff_c.mod (4.6 KB)

That does not look to bad. And what happens if you estimate the model only on a few periods of data, i.e. is it a general problem or one of the specific observations you are feeding in.

I’m not quite sure. The model began converging when I switched to the inversion filter. When I run the model on the attached data (beginning at observation 191), it runs for several days before giving the error message:

Unrecognized function or variable ‘cgg_0819_ff_c.occbin_difference’.
Error in occbin.solve_one_constraint (line 193)
[binding, relax, err]=feval([M_.fname,‘.occbin_difference’],zdatalinear_+repmat(dr_base.ys’,size(zdatalinear_,1),1),M_.params,dr_base.ys);

The full log file is attached. I have a similar issue if I run the model on a very small subset of the data (even ~10 observations): the estimation runs for ages trying to find the mode before breaking.
cgg_0819_ff_c.log (9.5 KB)
cgg_data_zlb2.mat (5.2 KB)

That is really strange, because that file must have been found on each single previous iteration. Did you run the code with mirroring on a cloud drive?

Yep, that’s exactly what it was. Running the model with the inversion filter worked now. Thanks!