Hi everyone,

I’m currently working on replicating Figure 4 from the paper by Francesco Bianchi and Leonardo Melosi, *“Fiscal Theory of Persistent Inflation”*. I’ve attached my mod file, MATLAB script, and datasets.

fig4.mod (37.2 KB)

parameters.mat (675 Bytes)

usdata_S1.xlsx (40.3 KB)

However, I’ve encountered the following error message:

```
Error using *
Incorrect dimensions for matrix multiplication. Check that the number of columns in the first matrix matches the number of
rows in the second matrix. To operate on each element of the matrix individually, use TIMES (.*) for elementwise
multiplication.
Error in hessian (line 12)
h1=max(abs(x),sqrt(gstep_)*ones(n,1))*eps^(1/6);
Error in dynare_estimation_1 (line 267)
hh = hessian(objective_function, xparam1, options_.gstep, dataset_, dataset_info, options_, M_, estim_params_, bayestopt_, bounds,oo_.dr,oo_.steady_state,oo_.exo_steady_state,oo_.exo_det_steady_state);
Error in dynare_estimation (line 105)
dynare_estimation_1(var_list,dname);
Error in fig4.driver (line 2126)
oo_recursive_=dynare_estimation(var_list_);
Error in dynare (line 310)
evalin('base',[fname '.driver']);
Error in generate_fig4 (line 12)
dynare fig4
```

I’m unsure how to resolve this issue, and any guidance would be greatly appreciated.

Additionally, I would like some input on refining the `estimation`

command in the mod file. Here is my current command:

```
estimation(mh_jscale=0.375,
mode_compute=4,
datafile=usdata_S1,
mh_nblocks=1,
mode_check,
diffuse_filter,
mh_replic=1000,
mh_drop=0.25,
plot_priors=0,
bayesian_irf, prior_trunc=0);
```

The goal is to implement MCMC estimation using Chris Sim’s optimization function, `csminwel`

, to search for the mode in line with the authors’ replication files. However, I’m unsure which additional arguments might be required to closely match the results obtained by the authors.

Lastly, in the replication folder provided by the authors, the Phillips curve component of the model block includes cost-push shocks for both the shadow economy and the main economy. However, to generate similar IRFs to those in Figure 4 of the paper, I found that I need to remove the cost-push shocks in the shadow economy from my Dynare code and ensure they only affect the main economy.

To see the difference, you can add `unkpchat`

to the Phillips curve for the shadow economy in the mod file below (you can ran it with the parameter.mat file attached above). When you do so, the IRFs for this shock diverge significantly from those in the paper. However, if you simply run the mod file as provided below (without adding `unkpchat`

), the resulting IRFs exhibit very similar patterns to those in the paper, albeit with some differences in magnitude.

fig4_without_estimation.mod (34.9 KB)

I would greatly appreciate any suggestions or advice.

Link for the replication folders for Bianchi et al (2021): https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/VGBS6F