Hi Johannes,

I was switching my first-order estimation to second-order, and by setting `mode_compute=0`

and `mode_file = xxx_mode`

I believe I’m using the same initial point. While in the first-order estimation, the (minus) loglikelihood was evaluated as a finite value (some value around 500), the second-order one yields a huge minus loglikelihood (with several thousand particle filters, I believe), which essentially means the first-order guess is a complete failure. I was wondering how to fix that issue, and whether there’s anything I’m missing? I already set all the pruning options to be 1.

Thanks a lot!

I would need to see the files. Can it be due to the measurement error specification?

I specify the same measurement error though.

Let me provide the mode file, the dynare mod and the data here. Thanks!

base_est.mod (13.7 KB)

base_est_mode.mat (675 Bytes)

data.csv (16.3 KB)

Using

```
temp=load('base_est_mode');
M_ = set_all_parameters(temp.xparam1,estim_params_,M_);
stoch_simul(order=1) inflation FFR realWageGrowth realGDPGrowth HoursPerCapita inverseInvestmentPriceGrowth;
stoch_simul(order=2) inflation FFR realWageGrowth realGDPGrowth HoursPerCapita inverseInvestmentPriceGrowth;
```

shows that at first order

```
THEORETICAL MOMENTS
VARIABLE MEAN STD. DEV. VARIANCE
inflation 0.0101 0.7447 0.5546
FFR 0.0166 3.6130 13.0539
realWageGrowth -5.4621 12.8128 164.1683
realGDPGrowth -5.4621 26.2434 688.7182
HoursPerCapita -1.7059 24.3213 591.5246
inverseInvestmentPriceGrowth -0.0046 2.9547 8.7304
```

and at second order

```
APPROXIMATED THEORETICAL MOMENTS
VARIABLE MEAN STD. DEV. VARIANCE
inflation -39.3546 0.7447 0.5546
FFR -77.3680 3.6130 13.0539
realWageGrowth -117.3884 12.8128 164.1683
realGDPGrowth 544.9635 26.2434 688.7182
HoursPerCapita 405.8434 24.3213 591.5246
inverseInvestmentPriceGrowth -0.0046 2.9547 8.7304
```

Both seems pretty far off from the actual data used. But given the high volatility in the model, the nonlinearities kicking in at order=2 are huge, explaining the difference.

I see, yes, indeed the volatility should be one magnitude lower than what I have here. Then there’s another issue coming up: I cannot really set those initial points of shocks close to 0 as Dynare somehow exports some error, even though I’m using `inv_gamma`

distributions.

Ah, nvm, I think I found a critical issue in the mod file I provided. Stupid me.

Thanks a lot for your help! It actually helped me debugging the mod file.

You used a prior as in Smets/Wouters, but there the data was multiplied by 100. That is not easily feasible with higher order approximations.

No, that data multiplication was intended. My mistake was taking an exponential of the shock variances which I shouldn’t. Therefore the variance indeed explode, and I didn’t catch that error because I was checking the behavior of the first-order solutions – you know, those shock variances don’t matter in that case.

Many thanks for your help!