From 6460a3a1e564ea59d0521322b5d011c841621062 Mon Sep 17 00:00:00 2001 From: Johannes Pfeifer Date: Wed, 14 Nov 2018 10:10:40 +0100 Subject: [PATCH] Document prior moments(distribution) option --- doc/dynare.texi | 7 +++++++ matlab/cli/prior.m | 4 ++-- matlab/print_moments_implied_prior.m | 15 +++++++++++++-- 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/doc/dynare.texi b/doc/dynare.texi index 20bb1eaeb..1b6eca9d2 100644 --- a/doc/dynare.texi +++ b/doc/dynare.texi @@ -14773,6 +14773,13 @@ Computes and displays first and second order moments of the endogenous variables at the prior mode (considering the linearized version of the model). +@item moments(distribution) +Computes and displays the prior mean and prior standard deviation of the +first and second moments of the endogenous variables (considering the +linearized version of the model) by randomly sampling from the prior. +The results will also be stored in the @code{prior} subfolder in a +@code{_endogenous_variables_prior_draws.mat} file. + @item optimize Optimizes the prior density (starting from a random initial guess). The parameters such that the steady state does not exist or does not satisfy diff --git a/matlab/cli/prior.m b/matlab/cli/prior.m index efb446826..5779ea307 100644 --- a/matlab/cli/prior.m +++ b/matlab/cli/prior.m @@ -3,7 +3,7 @@ function varargout = prior(varargin) % Computes various prior statistics and display them in the command window. % % INPUTS -% 'table', 'moments', 'optimize', 'simulate', 'plot' +% 'table', 'moments', 'optimize', 'simulate', 'plot', 'moments(distribution)' % % OUTPUTS % none @@ -11,7 +11,7 @@ function varargout = prior(varargin) % SPECIAL REQUIREMENTS % none -% Copyright (C) 2015-2017 Dynare Team +% Copyright (C) 2015-2018 Dynare Team % % This file is part of Dynare. % diff --git a/matlab/print_moments_implied_prior.m b/matlab/print_moments_implied_prior.m index 2d6e52d4f..ebce7c15a 100644 --- a/matlab/print_moments_implied_prior.m +++ b/matlab/print_moments_implied_prior.m @@ -1,7 +1,18 @@ function print_moments_implied_prior(ModelInfo, mm, vm, mv, vv) - +%function print_moments_implied_prior(ModelInfo, mm, vm, mv, vv) % This routine prints in the command window some descriptive statistics % about the endogenous variables implied prior moments. +% Inputs: +% - ModelInfo [structure] Dynare's model structure +% - mm [endo_nbr*1] mean first moments of the endogenous +% variables +% - vm [endo_nbr*1] variance of the first moments of the +% endogenous variables +% - mv [endo_nbr*endo_nbr] mean first moments of the endogenous +% variables +% - vv [endo_nbr] variance of the first moments of the +% endogenous variables + % Copyright (C) 2016-2018 Dynare Team % @@ -45,7 +56,7 @@ skipline(2) disp(TT) skipline(2) -disp('(Implied) Prior moments of the endogenous variables'' variance') +disp('(Implied) Prior moments of the endogenous variables'' (co)variance') disp(printline(61, '-')) T1a = 'VARIABLE-1';