Hi!

I’m very new to dynare.

I’m trying to estimate a (sort of) large model. I’ve been following examples that I found online. Mostly, Anzoategui et al. (2019, AEJ: Macro) and Christiano et al. (2014, AER).

I’m not sure what the error of my code means, so any ideas will be much appreciated.

From my reading of the two codes, I need to define certain equations using the pound (#) operator, so that in the estimation, these are not set fixed, right?

Nevertheless, it seems that dynare doesn’t like to apply leads in such equations.

Also, I guess that if I’m defining model local variables, then I can’t define them in the variables block in the model?

Also, I’m using dynare 4.5.7 because I’ve also used dynareOBC in the past, and as far as I know, the match between dynareOBC and dynare 4.5.7 was great. I don’t mind updating to dynare 6.1, but just wondering if it’d be necessary or I can just move on.

The error is

ERROR: model_estimation.mod: line 45, cols 1-57: Ntil has wrong type or was already used on the right-hand side. You cannot use it on the left-hand side of a pound (‘#’) expression

but when i remove it from the block of # defined variables, I get

ERROR: model_estimation.mod: line 46, cols 1-51: x2 has wrong type or was already used on the right-hand side. You cannot use it on the left-hand side of a pound (‘#’) expression

and so on

data_use.mat (6.2 KB)

model_estimation.mod (7.9 KB)

estimation_params.m (8.8 KB)