Is there any strategy I could use to systematically investigate the influence that a specific parameter has on the theoretical moments of the endogenous variables? Could the Jacobian computed during the identification check based on moments be of interest for this specific exercise?

The `sensitivity`

command can be used to investigate this.

Thank you, Johannes!

My goal is to understand which parameter combination I could adjust, relative to the baseline calibration, to obtain a specific variance of the endogenous variable x. Based on your hint, I used the following code:

```
moment_calibration;
x, x, [25,35];
end;
sensitivity(stab = 1);
```

When I run `stoch_simul(periods = 0)`

, I get a theoretical variance of x of about 30. Given the specification of the `moment_calibration`

block above, it says that 0% of the prior support match the moment x vs x inside [25,35]. Have I specified the block incorrectly?

I would need to see the full codes.

Hi Johannes,

I’ve just realised that I used the prior instead of the posterior distribution for the sensitivity command. The code snippet above works now. I also watched Marco Ratto’s introduction to GSA on YouTube. It has helped to understand the interpretation of the plots that the GSA toolbox creates. However, I’m still not sure how I can interpret the results that are printed in the command window, for instance, I obtain:

```
1.5% of the post support matches MOMENT v_D_Y_ann vs v_D_Y_ann(0) inside [16.8, 18.0]
Smirnov statistics in driving v_D_Y_ann vs v_D_Y_ann(0)
Parameter d-stat p-value
tp_sig_z 0.956 0.000
p_zeta_p 0.910 0.000
p_zeta_w 0.718 0.000
p_eta 0.479 0.000
Correlation analysis for moment restriction
Parameters corrcoef
[p_rho,tp_sig_beta] -0.852
Correlation analysis for NO moment restriction
Parameters corrcoef
[p_iota_w,p_rho] 0.201
[p_iota_w,p_eta] 0.460
[p_iota_w,p_rho_i] -0.229
[p_iota_w,p_phi_pi] -0.231
```

How do I interpret these results, especially those based on the correlation analysis? Given that I use a medium size DSGE model, I have plenty of parameters showing up in the “scatter matrix” plot that shows how the parameters could be adjusted to satisfy the moment restriction. Would it also be possible to just analyse whether changes in, let’s say, 2 parameters, can satisfy the moment constraint while holding all other parameter values constant?

The first part

shows which parameters are mainly responsible for satisfying your restriction. The second part

is about whether tradeoffs exist, i.e. if it’s more likely to satisfy the restriction if `p_rho`

is low while `tp_sig_beta`

is high.

Thank you very much for the explanation.

Is it also possible to “select” a specific parameter and to analyse whether a change in this particular parameter can contribute, at least partially, to satisfying the moment restriction, while holding all other parameter values constant?

If you don’t have an `estimated_params`

-block, Dynare will test all parameters. If such a block is present, only the “estimated” ones will be checked.

I see, thank you! If I only keep the parameters within the` estimated_params`

-block, that I want to check, I run into the issue that my mode-file as well as the mh-files are based on all estimated parameters.

Is it possible to remove all other parameters from those files by hand? Will Dynare accept these manipulated files?

Why is the posterior of interest here in the first place? You are conducting a theoretical investigation. You could just calibrate the parameters in a different mod-file to their posterior mode and investigate there.

I see your point. Thank you very much!

If I do the analysis for two parameters, Dynare plots a scatter plot between these two and shows combinations in blue that satisfy my moment restriction. It also stores a file

`..._prior_restrictions.mat`

in the gsa folder. Now, I am looking for the raw data of the scatter plot.

`..._prior_restrictions.mat`

contains a cell array named `mat_moment`

. I guess it contains the targeted moment over all iterations. It has the size 2048x1.

1a) Is this correct?

It also contains an array `xmat`

. It has the size 1952x2. I guess this array contains the parameter values associated with the moments.

1b) Is this also correct? If so, why does it have less rows than `mat_moment`

?

To answer this, I would need to see the codes.

I’ve constructed an example based on the `NK-baseline.mod`

file. Please find the files below.

The size of the matrices `xmat`

and `irestrictions`

as part of `NK_baseline_prior_restrictions.mat`

seems to vary with different prior distribution since I was not able to exactly replicate the size of 1952x2.

NK_baseline.mod (8.7 KB)

NK_baseline_steadystate.m (4.9 KB)

In its current implementation, `xmat`

contains all valid parameter draws (e.g Blanchard-Kahn conditions violated), while `mat_moment`

contains the targeted moment. The different length comes from the fact that in `mat_moment`

the output is simply `NaN`

for invalid parameter draws, while these draws are not part of `xmat`

.

Thank you, Johannes!

Given that I would like to target two variances within the `moment_calibration`

-block, is it possible to combine both with a logical AND?

In the Dynare manual it is written that:

A list of restrictions must always be fulfilled with logical AND.

However, if I use the notation below, I do get one result for the variance of y and one result for the variance of x.

moment_calibration;

y, y, [5,10];

x, x, [2,3];

end;

Can you provide a file to replicate the issue?