From bb3b96eb54c4fa0a970ecd70ed80a3d4ef2b3abc Mon Sep 17 00:00:00 2001 From: Johannes Pfeifer Date: Thu, 18 Sep 2014 10:29:41 +0200 Subject: [PATCH 1/3] Clarify the role of prior bounds in the manual --- doc/dynare.texi | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/doc/dynare.texi b/doc/dynare.texi index 731692d33..e48d5bb03 100644 --- a/doc/dynare.texi +++ b/doc/dynare.texi @@ -4353,10 +4353,12 @@ Specifies a starting value for the posterior mode optimizer or the maximum likelihood estimation. If unset, defaults to the prior mean. @item @var{LOWER_BOUND} -Specifies a lower bound for the parameter value in maximum likelihood estimation +@anchor{lower_bound} +Specifies a lower bound for the parameter value in maximum likelihood estimation and the lower bound for truncation of the prior distribution in Bayesian estimation. In case of Bayesian estimation, the untruncated prior distribution is simply truncated to the specified bounds without redistributing the truncated mass. As a consequence, the specified @ref{prior_mean} and @ref{prior_standard_error} still refer to the underlying untruncated distribution. Moreover, the truncated prior does not integrate to 1. Currently, Dynare does not consider this truncation in @ref{model_comparison}. +If unset, defaults to minus infinity (ML) or the natural lower bound of the prior (Bayesian estimation). @item @var{UPPER_BOUND} -Specifies an upper bound for the parameter value in maximum likelihood estimation +Same as @ref{lower_bound}, but specifying an upper bound instead. @item @var{PRIOR_SHAPE} A keyword specifying the shape of the prior density. @@ -4368,10 +4370,10 @@ that @code{inv_gamma_pdf} is equivalent to @code{inv_gamma1_pdf} @item @var{PRIOR_MEAN} -The mean of the prior distribution +@anchor{prior_mean} The mean of the prior distribution @item @var{PRIOR_STANDARD_ERROR} -The standard error of the prior distribution +@anchor{prior_standard_error} The standard error of the prior distribution @item @var{PRIOR_3RD_PARAMETER} A third parameter of the prior used for generalized beta distribution, @@ -5731,7 +5733,7 @@ estimates using a higher tapering are usually more reliable. @deffn Command model_comparison @var{FILENAME}[(@var{DOUBLE})]@dots{}; @deffnx Command model_comparison (marginal_density = laplace | modifiedharmonicmean) @var{FILENAME}[(@var{DOUBLE})]@dots{}; - +@anchor{model_comparison} @descriptionhead This command computes odds ratios and estimate a posterior density @@ -5741,6 +5743,13 @@ as the @var{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 1 due to explicit truncation using +e.g. @ref{lower_bound} or because meaningful prior mass is implicitly truncated d +ue to instability and indeterminacy of the model, the model comparison may be invalid. +At the current stage, Dynare does not renormalize the prior accordingly and it is the +user's responsibility to make sure that model comparison is based on proper priors. + @examplehead From aa503abfa79145efc0840c79210e795e1b76df84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Adjemian=20=28Charybdis=29?= Date: Fri, 19 Sep 2014 23:17:34 +0200 Subject: [PATCH 2/3] Correction on PR #734 (role of prior bounds). --- doc/dynare.texi | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/doc/dynare.texi b/doc/dynare.texi index e48d5bb03..2b1c39bb3 100644 --- a/doc/dynare.texi +++ b/doc/dynare.texi @@ -4353,9 +4353,17 @@ Specifies a starting value for the posterior mode optimizer or the maximum likelihood estimation. If unset, defaults to the prior mean. @item @var{LOWER_BOUND} -@anchor{lower_bound} -Specifies a lower bound for the parameter value in maximum likelihood estimation and the lower bound for truncation of the prior distribution in Bayesian estimation. In case of Bayesian estimation, the untruncated prior distribution is simply truncated to the specified bounds without redistributing the truncated mass. As a consequence, the specified @ref{prior_mean} and @ref{prior_standard_error} still refer to the underlying untruncated distribution. Moreover, the truncated prior does not integrate to 1. Currently, Dynare does not consider this truncation in @ref{model_comparison}. -If unset, defaults to minus infinity (ML) or the natural lower bound of the prior (Bayesian estimation). +@anchor{lower_bound} Specifies a lower bound for the parameter value in maximum +likelihood estimation. In a Bayesian estimation context, sets a lower bound +only effective while maximizing the posterior kernel. This lower bound does not +modify the shape of the prior density, and is only aimed at helping the +optimizer in identifying the posterior mode (no consequences for the MCMC). For +some prior densities (namely inverse gamma, gamma, uniform or beta) it is +possible to shift the default lower bound (zero) on the left or the right using +@ref{prior_3rd_parameter}. In this case the prior density is effectively +modified (note that the truncated Gaussian density is not implemented in +Dynare). If unset, defaults to minus infinity (ML) or the natural lower bound +of the prior (Bayesian estimation). @item @var{UPPER_BOUND} Same as @ref{lower_bound}, but specifying an upper bound instead. @@ -4376,10 +4384,12 @@ that @code{inv_gamma_pdf} is equivalent to @anchor{prior_standard_error} The standard error of the prior distribution @item @var{PRIOR_3RD_PARAMETER} +@anchor{prior_3rd_parameter} A third parameter of the prior used for generalized beta distribution, generalized gamma and for the uniform distribution. Default: @code{0} @item @var{PRIOR_4TH_PARAMETER} +@anchor{prior_4th_parameter} A fourth parameter of the prior used for generalized beta distribution and for the uniform distribution. Default: @code{1} From 9eaf0a1ff5f0222b56d7fddc72f9fb6c40837a0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Adjemian=20=28Charybdis=29?= Date: Fri, 19 Sep 2014 23:39:16 +0200 Subject: [PATCH 3/3] Correction of PR #734 (model comparison). --- doc/dynare.texi | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/doc/dynare.texi b/doc/dynare.texi index 2b1c39bb3..d48175b6f 100644 --- a/doc/dynare.texi +++ b/doc/dynare.texi @@ -5746,19 +5746,25 @@ estimates using a higher tapering are usually more reliable. @anchor{model_comparison} @descriptionhead -This command computes odds ratios and estimate a posterior density -over a collection of models -(see e.g. @cite{Koop (2003), Ch. 1}). The priors over models can be specified -as the @var{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 1 due to explicit truncation using -e.g. @ref{lower_bound} or because meaningful prior mass is implicitly truncated d -ue to instability and indeterminacy of the model, the model comparison may be invalid. -At the current stage, Dynare does not renormalize the prior accordingly and it is the -user's responsibility to make sure that model comparison is based on proper priors. +This command computes odds ratios and estimate a posterior density over a +collection of models (see e.g. @cite{Koop (2003), Ch. 1}). The priors over +models can be specified as the @var{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. @examplehead