| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Dynare provides an interface to the global sensitivity analysis (GSA) toolbox (developed by the Joint Research Center (JRC) of the European Commission), which is now part of the official Dynare distribution. The GSA toolbox can be used to answer the following questions:
The discussion of the methodologies and their application is described in Ratto (2008).
With respect to the previous version of the toolbox, in order to work properly, the GSA toolbox no longer requires that the Dynare estimation environment is set up.
Sensitivity analysis results are saved locally in <mod_file>/GSA,
where <mod_file>.mod is the name of the DYNARE model file.
| 4.17.1 Sampling | ||
| 4.17.2 Stability Mapping | ||
| 4.17.3 Reduced Form Mapping | ||
| 4.17.4 RMSE | ||
| 4.17.5 Screening Analysis | ||
| 4.17.6 Identification Analysis | ||
| 4.17.7 Performing Sensitivity and Identification Analysis |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The following binary files are produced:
<mod_file>_prior.mat: this file stores information about the analyses
performed sampling from the prior ranges, i.e. pprior=1 and ppost=0;
<mod_file>_mc.mat: this file stores information about the analyses performed
sampling from multivariate normal, i.e. pprior=0 and ppost=0;
<mod_file>_post.mat: this file stores information about analyses performed
using the Metropolis posterior sample, i.e. ppost=1.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Figure files produced are of the form <mod_file>_prior_*.fig and store results
for stability mapping from prior Monte-Carlo samples:
<mod_file>_prior_stab_SA_*.fig: plots of the Smirnov test analyses
confronting the cdf of the sample fulfilling Blanchard-Kahn conditions
with the cdf of the rest of the sample;
<mod_file>_prior_stab_indet_SA_*.fig: plots of the Smirnov test
analyses confronting the cdf of the sample producing indeterminacy
with the cdf of the original prior sample;
<mod_file>_prior_stab_unst_SA_*.fig: plots of the Smirnov test
analyses confronting the cdf of the sample producing unstable (explosive
roots) behavior with the cdf of the original prior sample;
<mod_file>_prior_stable_corr_*.fig: plots of bivariate projections
of the sample fulfilling Blanchard-Kahn conditions;
<mod_file>_prior_indeterm_corr_*.fig: plots of bivariate projections
of the sample producing indeterminacy;
<mod_file>_prior_unstable_corr_*.fig: plots of bivariate projections
of the sample producing instability;
<mod_file>_prior_unacceptable_corr_*.fig: plots of bivariate projections
of the sample producing unacceptable solutions, i.e. either
instability or indeterminacy or the solution could not be found (e.g.
the steady state solution could not be found by the solver).
Similar conventions apply for <mod_file>_mc_*.fig files, obtained when
samples from multivariate normal are used.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The mapping of the reduced form solution forces the use of samples from
prior ranges or prior distributions, i.e.: pprior=1 and ppost=0. It
uses 250 samples to optimize smoothing parameters and 1000 samples to compute the
fit. The rest of the sample is used for out-of-sample validation. One can also
load a previously estimated mapping with a new Monte-Carlo sample, to look at the
forecast for the new Monte-Carlo sample.
The following synthetic figures are produced:
<mod_file>_redform_<endo name>_vs_lags_*.fig: shows bar charts
of the sensitivity indices for the ten most important parameters driving
the reduced form coefficients of the selected endogenous variables
(namendo) versus lagged endogenous variables (namlagendo); suffix
log indicates the results for log-transformed entries;
<mod_file>_redform_<endo name>_vs_shocks_*.fig: shows bar charts
of the sensitivity indices for the ten most important parameters driving
the reduced form coefficients of the selected endogenous variables
(namendo) versus exogenous variables (namexo); suffix log
indicates the results for log-transformed entries;
<mod_file>_redform_GSA(_log).fig: shows bar chart of all sensitivity
indices for each parameter: this allows one to notice parameters that
have a minor effect for any of the reduced form coefficients.
Detailed results of the analyses are shown in the subfolder <mod_file>/GSA/redform_stab,
where the detailed results of the estimation of the single functional relationships
between parameters
and reduced form coefficient are stored in separate directories
named as:
<namendo>_vs_<namlagendo>: for the entries of the transition matrix;
<namendo>_vs_<namexo>: for entries of the matrix of the shocks.
Moreover, analyses for log-transformed entries are denoted with the following
suffixes (
denotes the generic reduced form coefficient):
log: minuslog:
logsquared:
logskew:
The optimal type of transformation is automatically selected without the need of user intervention.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The RMSE analysis can be performed with different types of sampling options:
pprior=1 and ppost=0, the toolbox analyzes the RMSEs for
the Monte-Carlo sample obtained by sampling parameters from their prior distributions
(or prior ranges): this analysis provides some hints about
what parameter drives the fit of which observed series, prior to the full
estimation;
pprior=0 and ppost=0, the toolbox analyzes the RMSEs for
a multivariate normal Monte-Carlo sample, with covariance matrix based on
the inverse Hessian at the optimum: this analysis is useful when maximum likelihood
estimation is done (i.e. no Bayesian estimation);
ppost=1 the toolbox analyzes the RMSEs for the posterior sample
obtained by Dynare’s Metropolis procedure.
The use of cases 2 and 3 requires an estimation step beforehand. To
facilitate the sensitivity analysis after estimation, the dynare_sensitivity
command also allows you to indicate some options of the estimation
command. These are:
datafile
nobs
first_obs
prefilter
presample
nograph
nodisplay
graph_format
conf_sig
loglinear
mode_file
Binary files produced my RMSE analysis are:
<mod_file>_prior_*.mat: these files store the filtered and smoothed
variables for the prior Monte-Carlo sample, generated when doing RMSE analysis
(pprior=1 and ppost=0);
<mode_file>_mc_*.mat: these files store the filtered and smoothed variables
for the multivariate normal Monte-Carlo sample, generated when doing
RMSE analysis (pprior=0 and ppost=0).
Figure files <mod_file>_rmse_*.fig store results for the RMSE analysis.
<mod_file>_rmse_prior*.fig: save results for the analysis using prior
Monte-Carlo samples;
<mod_file>_rmse_mc*.fig: save results for the analysis using multivariate
normal Monte-Carlo samples;
<mod_file>_rmse_post*.fig: save results for the analysis using Metropolis
posterior samples.
The following types of figures are saved (we show prior sample to fix ideas, but the same conventions are used for multivariate normal and posterior):
<mod_file>_rmse_prior_*.fig: for each parameter, plots the cdfs
corresponding to the best 10% RMSEs of each observed series;
<mod_file>_rmse_prior_dens_*.fig: for each parameter, plots the
pdfs corresponding to the best 10% RMESs of each observed series;
<mod_file>_rmse_prior_<name of observedseries>_corr_*.fig: for
each observed series plots the bi-dimensional projections of samples
with the best 10% RMSEs, when the correlation is significant;
<mod_file>_rmse_prior_lnlik*.fig: for each observed series, plots
in red the cdf of the log-likelihood corresponding to the best 10%
RMSEs, in green the cdf of the rest of the sample and in blue the
cdf of the full sample; this allows one to see the presence of some
idiosyncratic behavior;
<mod_file>_rmse_prior_lnpost*.fig: for each observed series, plots
in red the cdf of the log-posterior corresponding to the best 10% RMSEs,
in green the cdf of the rest of the sample and in blue the cdf of the full
sample; this allows one to see idiosyncratic behavior;
<mod_file>_rmse_prior_lnprior*.fig: for each observed series, plots
in red the cdf of the log-prior corresponding to the best 10% RMSEs,
in green the cdf of the rest of the sample and in blue the cdf of the full
sample; this allows one to see idiosyncratic behavior;
<mod_file>_rmse_prior_lik_SA_*.fig: when lik_only=1, this shows
the Smirnov tests for the filtering of the best 10% log-likelihood values;
<mod_file>_rmse_prior_post_SA_*.fig: when lik_only=1, this shows
the Smirnov test for the filtering of the best 10% log-posterior values.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Screening analysis does not require any additional options with respect to those listed in Sampling Options. The toolbox performs all the analyses required and displays results.
The results of the screening analysis with Morris sampling design are stored
in the subfolder <mod_file>/GSA/SCREEN. The data file <mod_file>_prior stores
all the information of the analysis (Morris sample, reduced form coefficients,
etc.).
Screening analysis merely concerns reduced form coefficients. Similar synthetic bar charts as for the reduced form analysis with Monte-Carlo samples are saved:
<mod_file>_redform_<endo name>_vs_lags_*.fig: shows bar charts
of the elementary effect tests for the ten most important parameters
driving the reduced form coefficients of the selected endogenous variables
(namendo) versus lagged endogenous variables (namlagendo);
<mod_file>_redform_<endo name>_vs_shocks_*.fig: shows bar charts
of the elementary effect tests for the ten most important parameters
driving the reduced form coefficients of the selected endogenous variables
(namendo) versus exogenous variables (namexo);
<mod_file>_redform_screen.fig: shows bar chart of all elementary
effect tests for each parameter: this allows one to identify parameters that
have a minor effect for any of the reduced form coefficients.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Setting the option identification=1, an identification analysis based on
theoretical moments is performed. Sensitivity plots are provided that allow
to infer which parameters are most likely to be less identifiable.
Prerequisite for properly running all the identification routines, is the keyword
identification; in the Dynare model file. This keyword triggers
the computation of analytic derivatives of the model with respect to estimated
parameters and shocks. This is required for option morris=2,
which implements Iskrev (2010) identification analysis.
For example, the placing identification; dynare_sensitivity(identification=1, morris=2);
in the Dynare model file trigger identification analysis using analytic derivatives
Iskrev (2010), jointly with the mapping of the acceptable region.
The identification analysis with derivatives can also be triggered by the
commands identification; This does not do the mapping of
acceptable regions for the model and uses the standard random sampler of Dynare.
It completely offsets any use of the sensitivity analysis toolbox.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Description
This command triggers sensitivity analysis on a DSGE model.
nsam = INTEGERSize of the Monte-Carlo sample. Default: 2048
ilptau = INTEGERIf equal to 1, use
quasi-Monte-Carlo.
If equal to 0, use LHS Monte-Carlo. Default: 1
pprior = INTEGERIf equal to 1, sample from the prior distributions.
If equal to 0, sample from the multivariate normal
,
where
is the posterior mode and
,
is the Hessian at the mode. Default: 1
prior_range = INTEGERIf equal to 1, sample uniformly from prior ranges.
If equal to 0, sample from prior distributions. Default: 1
morris = INTEGER
If equal to 0, ANOVA mapping (Type I error)
If equal to 1, Screening analysis (Type II error)
If equal to 2, Analytic derivatives (similar to Type II error, only valid when
identification=1).Default: 1 when identification=1, 0 otherwise
morris_nliv = INTEGERmorris_ntra = INTEGERppost = INTEGERIf equal to 1, use Metropolis posterior sample.
If equal to 0, do not use Metropolis posterior sample. NB: This
overrides any other sampling option. Default: 0
neighborhood_width = DOUBLEWhen pprior=0 and ppost=0, allows for the sampling of
parameters around the value specified in the mode_file, in the range
xparam1
. Default: 0
Stability Mapping Options
stab = INTEGERIf equal to 1, perform stability mapping.
If equal to 0, do not perform stability mapping. Default: 1
load_stab = INTEGERIf equal to 1, load a previously created sample.
If equal to 0, generate a new sample. Default: 0
alpha2_stab = DOUBLECritical value for correlations
in filtered samples:
plot couples of parmaters with
alpha2_stab.
Default: 0.3
ksstat = DOUBLECritical value for Smirnov statistics
: plot parameters with
ksstat. Default: 0.1
pvalue_ks = DOUBLEThe threshold
for significant Kolmogorov-Smirnov test (i.e. plot parameters with
pvalue_ks). Default: 0.001
pvalue_corr = DOUBLEThe threshold
for significant correlation in filtered samples
(i.e. plot bivariate samples when
pvalue_corr). Default: 0.001
Reduced Form Mapping Options
redform = INTEGERIf equal to 1, prepare Monte-Carlo sample of reduced form matrices.
If equal to 0, do not prepare Monte-Carlo sample of reduced form matrices. Default: 0
load_redform = INTEGERIf equal to 1, load previously estimated mapping.
If equal to 0, estimate the mapping of the reduced form model. Default: 0
logtrans_redform = INTEGERIf equal to 1, use log-transformed entries.
If equal to 0, use raw entries. Default: 0
threshold_redform = [DOUBLE DOUBLE]The range over which the filtered Monte-Carlo entries of the reduced form coefficients
should be analyzed. The first number is the lower bound and the second is the upper bound.
An empty vector indicates that these entries will not be filtered. Default: empty
ksstat_redform = DOUBLECritical value for Smirnov statistics
when reduced form entries
are filtered. Default: 0.1
alpha2_redform = DOUBLECritical value for correlations
when reduced form entries
are filtered. Default: 0.3
namendo = (VARIABLE_NAME…)List of endogenous variables. ‘:’ indicates all endogenous variables.
Default: empty
namlagendo = (VARIABLE_NAME…)List of lagged endogenous variables. ‘:’ indicates all lagged endogenous variables.
Analyze entries [namendo![]()
namlagendo] Default: empty
namexo = (VARIABLE_NAME…)List of exogenous variables. ‘:’ indicates all exogenous variables.
Analyze entries [namendo![]()
namexo]. Default: empty
RMSE Options
rmse = INTEGERIf equal to 1, perform RMSE analysis.
If equal to 0, do not perform RMSE analysis. Default: 0
load_rmse = INTEGERIf equal to 1, load previous RMSE analysis.
If equal to 0, make a new RMSE analysis. Default: 0
lik_only = INTEGERIf equal to 1, compute only likelihood and posterior.
If equal to 0, compute RMSE’s for all observed series. Default: 0
var_rmse = (VARIABLE_NAME…)List of observed series to be considered. ‘:’ indicates all observed
variables. Default: varobs
pfilt_rmse = DOUBLEFiltering threshold for RMSE’s. Default: 0.1
istart_rmse = INTEGERValue at which to start computing RMSE’s (use 2 to avoid big intitial
error). Default: presample+1
alpha_rmse = DOUBLECritical value for Smirnov statistics
: plot parameters with
alpha_rmse. Default: 0.002
alpha2_rmse = DOUBLECritical value for correlation
: plot couples of parmaters with
alpha2_rmse. Default: 1.0
datafile = FILENAMESee datafile.
nobs = INTEGERnobs = [INTEGER1:INTEGER2]See nobs.
first_obs = INTEGERSee first_obs.
prefilter = INTEGERSee prefilter.
presample = INTEGERSee presample.
nographSee nograph.
nodisplaySee nodisplay.
graph_format = FORMATgraph_format = ( FORMAT, FORMAT… )See graph_format.
conf_sig = DOUBLESee conf_sig.
loglinearSee loglinear.
mode_file = FILENAMESee mode_file.
kalman_algo = INTEGERSee kalman_algo.
Identification Analysis Options
identification = INTEGERIf equal to 1, performs identification anlysis (forcing redform=0 and morris=1)
If equal to 0, no identification analysis. Default: 0
morris = INTEGERSee morris.
morris_nliv = INTEGERSee morris_nliv.
morris_ntra = INTEGERSee morris_ntra.
load_ident_files = INTEGERLoads previously performed identification analysis. Default: 0
useautocorr = INTEGERUse autocorrelation matrices in place of autocovariance matrices in moments
for identification analysis. Default: 0
ar = INTEGERMaximum number of lags for moments in identification analysis. Default: 1
lik_init = INTEGERSee lik_init.
Description
This command triggers identification analysis.
Options
ar = INTEGERNumber of lags of computed autocorrelations (theoretical moments). Default: 1
useautocorr = INTEGERIf equal to 1, compute derivatives of autocorrelation. If equal
to 0, compute derivatives of autocovariances. Default: 0
load_ident_files = INTEGERIf equal to 1, allow Dynare to load previously
computed analyzes. Default: 0
prior_mc = INTEGERSize of Monte-Carlo sample. Default: 1
prior_range = INTEGERTriggers uniform sample within the range implied by the prior specifications (when
prior_mc>1). Default: 0
advanced = INTEGERShows a more detailed analysis, comprised of an analysis for the linearized rational
expectation model as well as the associated reduced form solution. Further performs a brute
force search of the groups of parameters best reproducing the behavior of each single parameter.
The maximum dimension of the group searched is triggered by max_dim_cova_group. Default: 0
max_dim_cova_group = INTEGERIn the brute force search (performed when advanced=1) this option sets the maximum dimension of groups
of parameters that best reproduce the behavior of each single model parameter. Default: 2
periods = INTEGERWhen the analytic Hessian is not available (i.e. with missing values or diffuse
Kalman filter or univariate Kalman filter), this triggers the length of stochastic simulation
to compute Simulated Moments Uncertainty. Default: 300
replic = INTEGERWhen the analytic Hessian is not available, this triggers the number of replicas
to compute Simulated Moments Uncertainty. Default: 100
gsa_sample_file = INTEGERIf equal to 0, do not use sample file.
If equal to 1, triggers gsa prior sample.
If equal to 2, triggers gsa Monte-Carlo sample (i.e. loads a sample corresponding to
pprior=0 and ppost=0 in the dynare_sensitivity options). Default: 0
gsa_sample_file = FILENAMEUses the provided path to a specific user defined sample file. Default: 0
parameter_set = calibration | prior_mode | prior_mean | posterior_mode | posterior_mean | posterior_medianSpecify the parameter set to use. Default: prior_mean
lik_init = INTEGERSee lik_init.
kalman_algo = INTEGERSee kalman_algo.
nographSee nograph.
nodisplaySee nodisplay.
graph_format = FORMATgraph_format = ( FORMAT, FORMAT… )See graph_format.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] |
This document was generated by Build Daemon user on December 8, 2015 using texi2html 1.82.