This command computes odds ratios and estimate a posterior density over a collection of models (see e.g. Koop (2003), Ch. 1). The priors over models can be specified as the DOUBLE values, otherwise a uniform prior over all models is assumed. In contrast to frequentist econometrics, the models to be compared do not need to be nested. However, as the computation of posterior odds ratios is a Bayesian technique, the comparison of models estimated with maximum likelihood is not supported.
It is important to keep in mind that model comparison of this type is only valid with proper priors. If the prior does not integrate to one for all compared models, the comparison is not valid. This may be the case if part of the prior mass is implicitly truncated because Blanchard and Kahn conditions (instability or indeterminacy of the model) are not fulfilled, or because for some regions of the parameters space the deterministic steady state is undefined (or Dynare is unable to find it). The compared marginal densities should be renormalized by the effective prior mass, but this not done by Dynare: it is the user’s responsibility to make sure that model comparison is based on proper priors. Note that, for obvious reasons, this is not an issue if the compared marginal densities are based on Laplace approximations.
marginal_density = ESTIMATOR
Specifies the estimator for computing the marginal data density. ESTIMATOR can
take one of the following two values:
laplace for the Laplace estimator or
modifiedharmonicmean for the
Geweke (1999) Modified Harmonic Mean estimator. Default value:
The results are stored in
oo_.Model_Comparison, which is described below.
model_comparison my_model(0.7) alt_model(0.3);
This example attributes a 70% prior over
my_model and 30% prior
Variable set by the
model_comparison command. Fields are of the form:
where FILENAME is the file name of the model and VARIABLE_NAME is one of the following:
(Normalized) prior density over the model
Logarithm of the marginal data density
Ratio of the marginal data density of the model relative to the one of the first declared model
Posterior probability of the respective model