Estmation in deterministic model

Hi, I wonder whether Dnyare can do the estimation of exogenous shocks (declared in exovar in mod file) in a deterministic model? Is it possible to use MLE for a deterministic model? If so, is there any example code available? Thanks in advance!

For instance, I first declare the shock values in the parameter block and call them in the shock block.

varobs c;

exovar z ; // productivity
parameters; z1 z2 z3;

var z
period 1:3;
values z1 z2 z3;

In order to be able to write down a (non-degenerate) likelihood function, the model must feature stochastics. That is not the case in a deterministic model (at least not in the usual sense). You cannot find the “most likely shock”. What sometimes can be done is to invert the model. If there is a one-to-one mapping between observables and shocks, you can infer the exact shock sequence giving rise to the observables (as there is only one such sequence)

Dear Prof.:

Thanks for your reply! I see what you mean. May I bother you with one more question?

Is it possible for ‘lmmcp’ to compute the deterministic model with downward nominal wage rigidity? Coz I want to generate unemployment in my model. In particular, I set:

W_t >= W_t-1 x (1-delta), (each time revise the wage down by delta only)
l_t <= l_bar (l_bar is total labor supply)

I wonder whether including a slackness condition ( W_t - W_t-1 x (1-delta)) x ( l_t - l_bar ) = 0 can help with the computation here.

I get this idea from your code for SIR model, where you mentioned a slackness condition is imposed to present infection number to be negative.

If not working, how about re-setting W_t >= W_bar x (1-delta) (W_bar is constant)?

Thanks very much in advance!

Here is a DNWR example from my own work: BDMP_DNWR.mod (2.7 KB)

1 Like

Hi Prof.:

The sample code is most helpful. Thanks so much!

Regarding your previous suggestion, i.e. infer exact shock from observables in a deterministic model, what comes to my mind is using ‘fminsearch’ with each iteration calling dynare to compute the path. Is there any dynare built-in tool to do so?

I noticed ‘modeqs.mod’ can do variable flipping for steady state and wonder whether any similar function can be applied to transition path?

Thanks so much again!

  1. No, there is not tool to do this in perfect foresight.
  2. You actually don’t need to loop over Dynare, just over the underlying routines. I.e. you miminize over setting oo_.exo_simul and then running perfect_foresight_solver.