Hi,

does anybody understand why the attacched code (simple sticky price model) does not deliver IRF? Residuals of equations are zero and steady state values too (which is consistent with log linear equations). BK condition is not satisfied though, could it be an issue related with unit roots?

Thanks in advance

sticky_price.mod (1.3 KB)

It could be related to the timing in your equations or that one equation is missing and another is obsolete. Try running model_diagnostics

As `model_diagnostics`

shows:

```
MODEL_DIAGNOSTICS: The following endogenous variables aren't present at the current period in the model:
kb
```

Check your timing.

Well, kb in the model is predetermined, ansd if I specify law of motion as K_{t}=(1-\delta)K_{t-1}+I_{t}, it has to appear as K_{t-1} in the productioin function and FOC fof capital and labor as well, right? I can’t get how the timing could be wrong in such a simple model. Could it be an issue of collinearity, or something like that? Is collinearity related with timing?

Thanks!

You already use the stock at the end of period notation. Then also using `predetermined_variables`

shifts the timing on period into the past, which is wrong.

sticky_price.mod (1.2 KB)

I should have fixed it, but still it is not working; model_diagnostics delivers some warnings about collinearity.

Thanks, I am a beginner in dynare

Now you made the problem in the opposite direction. You changed the timing convention and removed the `predetermined_variables`

command. See also

sticky_price.mod (1.3 KB)

rbc.mod (1.1 KB)

The code runs following your timing advice but let me please clarify one last doubt; the simple rbc code I attach to this reply delivers IRFs with the timing for capital you suggested but without specifying it in the predetermined_variables block (I have K_{t+1}=(1-\delta)K_{t}+I_{t} but no predetermined_variables block). How is it possible? Which is the specific use of predetermined_variable command? Moreover, if law of motion reads K_{t+1}=(1-\delta)K_{t}+I_{t} I should have Cobb Douglas in K_{t} while if it reads K_{t}=(1-\delta)K_{t-1}+I_{t} (no investment lag) I should have Cobb Douglas in K_{t-1}?

Thank you so much

Because the Euler equation in the RBC model is also wrong.

```
lambdac(1)+(rb_ss/(rb_ss+deltac-1))*rkb=lambdac;
```

should not have `rkb`

today but rather `rkb(+1)`

.

rbc.mod (1.1 KB)

The model runs with the correct timing for the euler equation but still I do not specify a predetermined_variable block; surprisingly, it does not run if I predetermine kb and mantain the correct timing for Euler. Sorry to bother, but I am a beginner and I am trying to uncover the usage of predetermined_variable block, when am I supposed to use it and when I am not. Up to now, I have not found an ever-functioning method unfortunately.

Thank

There is a single correct timing and it seems you have not yet found it. All variables need to have the timing at which they are determined. Tomorrow’s return to capital for example is not contained in the current information set. In contrast, when using the stock at the beginning of period notation

`kb(1)=(1-deltac)*kb+deltac*ib;`

you know the value of `kb(1)`

because you choose it with today’s investment. Hence, the correct timing, conforming with Dynare’s timing convention would be the stock at the end of period convention:

```
kb=(1-deltac)*kb(-1)+deltac*ib;
```

You can use the `predetermined_variables`

command to signal to Dynare that you used the first convention and it will automatically translate the model to the second convention internally.