1function print_moments_implied_prior(ModelInfo, mm, vm, mv, vv)
2%function print_moments_implied_prior(ModelInfo, mm, vm, mv, vv)
3% This routine prints in the command window some descriptive statistics
4% about the endogenous variables implied prior moments.
5% Inputs:
6%   - ModelInfo     [structure]             Dynare's model structure
7%   - mm            [endo_nbr*1]            mean first moments of the endogenous
8%                                           variables
9%   - vm            [endo_nbr*1]            variance of the first moments of the
10%                                           endogenous variables
11%   - mv            [endo_nbr*endo_nbr]     mean first moments of the endogenous
12%                                           variables
13%   - vv            [endo_nbr]              variance of the first moments of the
14%                                           endogenous variables
15
16
17% Copyright (C) 2016-2018 Dynare Team
18%
19% This file is part of Dynare.
20%
21% Dynare is free software: you can redistribute it and/or modify
22% it under the terms of the GNU General Public License as published by
23% the Free Software Foundation, either version 3 of the License, or
24% (at your option) any later version.
25%
26% Dynare is distributed in the hope that it will be useful,
27% but WITHOUT ANY WARRANTY; without even the implied warranty of
28% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
29% GNU General Public License for more details.
30%
31% You should have received a copy of the GNU General Public License
32% along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
33
34% First order moments.
35
36disp('(Implied) Prior moments of the endogenous variables'' expectation')
37disp(printline(64, '-'))
38
39T1 = 'VARIABLE ';
40T2 = sprintf('Prior mean \t Prior st. dev.');
41
42for i=1:ModelInfo.orig_endo_nbr
43    Name = ModelInfo.endo_names{i};
44    T1 = strvcat(T1, Name);
45    str = sprintf(' %6.4f \t %6.4f', mm(i), sqrt(vm(i)));
46    T2 = strvcat(T2, str);
47end
48
49T0 = repmat('  ', ModelInfo.orig_endo_nbr+1, 1);
50
51TT = [T1, T0, T2];
52l0 = printline(size(TT, 2)+1, '-');
53TT = strvcat(l0, TT(1,:), l0, TT(2:end,:), l0);
54
55skipline(2)
56disp(TT)
57skipline(2)
58
59disp('(Implied) Prior moments of the endogenous variables'' (co)variance')
60disp(printline(61, '-'))
61
62T1a = 'VARIABLE-1';
63T1b = 'VARIABLE-2';
64T2a = 'Prior mean';
65T2b = 'Prior st.dev.';
66
67for i=1:ModelInfo.orig_endo_nbr
68    for j=i:ModelInfo.orig_endo_nbr
69        Name1 = ModelInfo.endo_names{i};
70        Name2 = ModelInfo.endo_names{j};
71        T1a = strvcat(T1a, Name1);
72        T1b = strvcat(T1b, Name2);
73        sta = sprintf('%12.8f', mv(i,j));
74        stb = sprintf('%12.8f', vv(i,j));
75        T2a = strvcat(T2a, sta);
76        T2b = strvcat(T2b, stb);
77    end
78end
79
80T0 = repmat('  ', ModelInfo.orig_endo_nbr*(ModelInfo.orig_endo_nbr+1)/2+1, 1);
81
82TT = [T1a, T0, T1b, T0, T2a, T0, T2b];
83l0 = printline(size(TT, 2)+1, '-');
84TT = strvcat(l0, TT(1,:), l0, TT(2:end,:), l0);
85
86skipline(2)
87disp(TT)
88skipline(2)