But I was using one-sided filter. Does this mean I can use Kalman filter? My model includes command lik_init = 2 and estimation worked fine at first, till I added parameters sigmaa, sigmae, sigmax, sigmaz and sigmav. Now I obtain error message:

WARNING: Model.mod:1.1-105: Symbol r declared twice.

ERROR: some estimated parameters (sigmaa, sigmae, sigmax, sigmaz, sigmav) also appear in the

expressions defining the variance/covariance matrix of shocks; this is not allowed.

Model.mod (3.8 KB)

Yes, you can use the Kalman filter. `lik_init`

is only about the initialization of the filter. It should not matter. Also, you cannot estimate `sigmaa`

, but rather,

```
stderr epsilona;
```

So Kalman filter runs automatically when I add āestimationā line? And it produces full sample maximum likelihood estimates of parameters?

Second, how could I include e and z as parameters, like they are in that paper on page 13/27. Adding them, I obtain error:

ERROR: Model.mod: line 110, col 1 - line 122, col 25: e is not a parameter

Model.mod (3.8 KB)

Yes, at `order=1`

without OccBin that is the case.

As written above, that makes absolutely no sense.

Perfect, I added option order=1 to the estimation command.

Secondly, I have few questions regarding estimated_params; block. The sigmaa, sigmax, sigmav and sigmaz have inverse gamma distribution according to the paper in the attachment on page 126/262, however stderr epsilona, stderr epsilone and stderr epsilonz have uniform_pdf distribution according to Dynare manual page 20/28. Which one is correct? Moreover, which distribution does beta have (I assume beta distribution?). And omegapi and omegay have normal distribution, does the same go for omegatau? Thank you.

Manual: NTG8.pdf (1.1 MB)

Paper: https://d-nb.info/1026165547/34

Model.mod (3.8 KB)

You can specify pretty much any prior distribution you like.

Thank you. Another question. In my output, which out of four columns are the full sample maximum likelihood parameter estimates, I assume the second column (Mode)?

Zvezek1.xlsx (9.2 KB)

I think you are confusing something. If you specify a (non-uniform) prior, you are not conducting ML, you are conducting Bayesian estimation. But yes, the statistic of interest is the posterior mode.

Of course, this makes perfect sense. But I have to do ML estimation with Kalman filter, according to that paper. Is it possible to do it without major changes in code, by simply specifying uniform distribution for all parameters in estimated_params; block?

As documented in the manual, if you donāt specify any prior, you will be conducting ML estimation.

Thank you, I deleted priors, but I obtain this error message.

Model.mod (3.5 KB)

You did not delete priors:

```
estimated_params;
bet, beta_pdf, 0.99, 0.01;
```

clearly specifies a prior distribution. Also, your are calling `steady`

without having initialized the parameter values.

Right, I brought back the section with parameter values in the beginning and deleted the estimated_params; section, but now I obtain error:

Estimation: the āestimated_paramsā block is mandatory (unless you are running a smoother)

Model.mod (3.2 KB)