# Sensitivity Analysis; Correlation Analyses

Dear all,

very recently, I started to try out the GSA tool on my model. Thus, I am very new in this and I already apologize for possibly stupid questions.
For now, I am working on the stability regions of my model. Below, you can find the last part of my code (in case there is some very obvious mistake I did not spot):

estimated_params;
etas , uniform_pdf, , , 0,2;
etasb , uniform_pdf, , , 0,2;
etal , uniform_pdf, , , 0,2;
etalb , uniform_pdf, , , 0,2;
end;

varobs ws wsb in inb;

dynare_sensitivity(prior_range=0,stab=1, Nsam = 5000);

My entire mod-file runs without any problems, I get the Smirnov test results and the different plots of the Smirnov test on the diagnoal and the different correlation analyses at the upper right and lower left part of the diagonal. However, I am a bit worried since the plots above and below the Smirnov test are not symmetric to each other (for every combination of etas and etal on the lower part, I get different results in terms of stability than for every combination of etas and etal on the upper part of the figure). In some lecture slides illustrating the GSA tool a bit, these 2-by-2 graphs were symmetric.

Is there another problem in my model which I am not aware of? Or did I misunderstood the interpretation of the output dynare provides? Is there some other source where to find more explanations on the tool in general? (The dynare reference manual contains many options and a lot of deeper information, but not many more basic explanations.)

Could you maybe upload the figure we are talking about? @rattoma Do you have any insights?

Here the two figures I was talking about. Output11.fig (2.7 MB)
Output12.fig (2.8 MB)

Thank you very much again

Hi
indeed the figures are NOT symmetric in the sense that the low triangular ones plot the RED dots AFTER [on top of] the BLUE, while the upper triangular flips the order, i.e. BLU dots AFTER [on top of] the RED.

This is done on purpose. In the low triangular plots, wherever you SEE blue regions, they are ‘robust’ regions for unique solutions since the red is not capable to ‘cover’ the blue areas.

In your case, the way I see, although there are combinations of the 4 params that may still provide indeterminacy, indeterminacy is likely to be ruled out if those params are sufficiently larger than zero.

The vice-versa holds for upper triangular. If params are zero are very near to zero, you will surely have indeterminacy, since there are only red dots along the zero axes.

hope this helps

This was an explanation, I was looking for. Thank you very very much

Dear all,

I have another question on the dynare_sensitivity tool. I was playing around with the irf_calibration option to see which parameters drive the positive response of my shot-term debt stock after a positive technology shock.

My code was the following:

estimated_params;
etas , uniform_pdf, , , 1,2;
etasb , uniform_pdf, , , 1,2;
etal , uniform_pdf, , , 1,2;
etalb , uniform_pdf, , , 1,2;
betta , uniform_pdf, , , 0.96, 0.99;
xi , uniform_pdf, , , 0.25, 0.55;
mu , uniform_pdf, , , 0.025, 0.05;
alfa , uniform_pdf, , , 0.30, 0.40;
tau , uniform_pdf, , , 0.10, 0.45;
theta , uniform_pdf, , , 1.2, 5;
thetab , uniform_pdf, , , 1.2, 5;
piD , uniform_pdf, , , 0.001, 0.005;
piDb , uniform_pdf, , , 0.01, 0.05;
piN , uniform_pdf, , , 0.001, 0.005;
piNb , uniform_pdf, , , 0.01, 0.05;
K_0b , uniform_pdf, , , 6, 11;
rho , uniform_pdf, , , 0.8, 0.99;
gamma , uniform_pdf, , , 2, 5;
end;

irf_calibration;
@#for ilag in 1:20
Bsg_obs(@{ilag}), e, [0, inf];
@#endfor
end;

varobs ws;
dynare_sensitivity(prior_range=0,stab=0, Nsam = 2048, graph_format=(fig));

So, first I specified the prior distributions of (almost all) parameters of my model, further, the IRF restriction to give me a positive response of short-term debt (Bsg_obs) in the first 20 periods and used the option to not perform the stability analysis again. Unfortunately ( and as I expected), my model is able to produce this positive response only for very few parameter from the prior support (the Smirnov test indicates that around 0.9% of the prior support fulfills this restriction). So far so good.
However, what worries me a lot is that my plot of the IRF restriction looks very weird. V1_prior_irf_restrictions.fig (24.4 KB)

The IRF bands on the graph are oscillating Could maybe complex eigenvalues create this problem? I was already asking the question about complex eigenvalues a couple of weeks ago Where do the eigenvalues belong to? and if this creates any problem. Indeed, in this model, I have a complex eigenvalue but only on the UNSTABLE root, which did not create any problems (my impulse responses converged smoothly without oscillation to zero).
In another model version (which is quite different from this one), I have this oscillation problem already when simulating the model. From trial and error, I found our that this phenomenon appears always when a STABLE root is complex. (I was already checking the timing conventions and the equations for several times without finding a mistake )
Could it be that for some parameter values the complex eigenvalue “shifts” from the unstable root to the stable one and causes this result? How can I find out if this is the problem and do you have any suggestions how to solve this issue?