Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
dynare
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dynare
dynare
Commits
0b491b3b
Verified
Commit
0b491b3b
authored
3 years ago
by
Johannes Pfeifer
Committed by
Stéphane Adjemian
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Estimation: fix header column widths in display of results
parent
948e4e75
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
matlab/GetPosteriorParametersStatistics.m
+1
-1
1 addition, 1 deletion
matlab/GetPosteriorParametersStatistics.m
matlab/display_estimation_results_table.m
+12
-12
12 additions, 12 deletions
matlab/display_estimation_results_table.m
with
13 additions
and
13 deletions
matlab/GetPosteriorParametersStatistics.m
+
1
−
1
View file @
0b491b3b
...
...
@@ -63,7 +63,7 @@ clear record;
header_width
=
row_header_width
(
M_
,
estim_params_
,
bayestopt_
);
hpd_interval
=
[
num2str
(
options_
.
mh_conf_sig
*
100
),
'% HPD interval'
];
tit2
=
sprintf
(
'%-*s %12s %12s %23s %8s %12s\n'
,
header_width
,
' '
,
'prior mean'
,
'post. mean'
,
hpd_interval
,
'prior'
,
'pstdev'
);
pformat
=
'%-*s %12.3f % 12.4f %11.4f %11.4f %
7
s %12.4f'
;
pformat
=
'%-*s %12.3f % 12.4f %11.4f %11.4f %
8
s %12.4f'
;
skipline
(
2
)
disp
(
'ESTIMATION RESULTS'
)
...
...
This diff is collapsed.
Click to expand it.
matlab/display_estimation_results_table.m
+
12
−
12
View file @
0b491b3b
...
...
@@ -51,10 +51,10 @@ tstath = abs(xparam1)./stdh;
header_width
=
row_header_width
(
M_
,
estim_params_
,
bayestopt_
);
if
strcmp
(
field_name
,
'posterior'
)
tit1
=
sprintf
(
'%-*s %
7
s %8s %7s %
4
s %6s\n'
,
header_width
-
2
,
' '
,
'prior mean'
,
...
tit1
=
sprintf
(
'%-*s %
10
s %8s %7s %
6
s %6s\n'
,
header_width
,
' '
,
'prior mean'
,
...
'mode'
,
's.d.'
,
'prior'
,
'pstdev'
);
else
tit1
=
sprintf
(
'%-*s %10s %7s %6s\n'
,
header_width
-
2
,
' '
,
'Estimate'
,
's.d.'
,
't-stat'
);
tit1
=
sprintf
(
'%-*s %10s %7s %6s\n'
,
header_width
,
' '
,
'Estimate'
,
's.d.'
,
't-stat'
);
end
if
np
ip
=
nvx
+
nvn
+
ncx
+
ncn
+
1
;
...
...
@@ -63,13 +63,13 @@ if np
for
i
=
1
:
np
name
=
bayestopt_
.
name
{
ip
};
if
strcmp
(
field_name
,
'posterior'
)
fprintf
(
'%-*s %
7.3
f %8.4f %7.4f %
4
s %6.4f \n'
,
...
fprintf
(
'%-*s %
10.4
f %8.4f %7.4f %
6
s %6.4f \n'
,
...
header_width
,
name
,
...
bayestopt_
.
p1
(
ip
),
xparam1
(
ip
),
stdh
(
ip
),
...
pnames
{
bayestopt_
.
pshape
(
ip
)
+
1
},
...
bayestopt_
.
p2
(
ip
));
else
fprintf
(
'%-*s %
8
.4f %7.4f %7.4f \n'
,
...
fprintf
(
'%-*s %
10
.4f %7.4f %7.4f \n'
,
...
header_width
,
name
,
xparam1
(
ip
),
stdh
(
ip
),
tstath
(
ip
));
end
eval
([
'oo_.'
field_name
'_mode.parameters.'
name
' = xparam1(ip);'
]);
...
...
@@ -86,12 +86,12 @@ if nvx
k
=
estim_params_
.
var_exo
(
i
,
1
);
name
=
M_
.
exo_names
{
k
};
if
strcmp
(
field_name
,
'posterior'
)
fprintf
(
'%-*s %
7.3
f %8.4f %7.4f %
4
s %6.4f \n'
,
...
fprintf
(
'%-*s %
10.4
f %8.4f %7.4f %
6
s %6.4f \n'
,
...
header_width
,
name
,
bayestopt_
.
p1
(
ip
),
xparam1
(
ip
),
...
stdh
(
ip
),
pnames
{
bayestopt_
.
pshape
(
ip
)
+
1
},
...
bayestopt_
.
p2
(
ip
));
else
fprintf
(
'%-*s %
8
.4f %7.4f %7.4f \n'
,
header_width
,
name
,
xparam1
(
ip
),
stdh
(
ip
),
tstath
(
ip
));
fprintf
(
'%-*s %
10
.4f %7.4f %7.4f \n'
,
header_width
,
name
,
xparam1
(
ip
),
stdh
(
ip
),
tstath
(
ip
));
end
M_
.
Sigma_e
(
k
,
k
)
=
xparam1
(
ip
)
*
xparam1
(
ip
);
eval
([
'oo_.'
field_name
'_mode.shocks_std.'
name
' = xparam1(ip);'
]);
...
...
@@ -107,13 +107,13 @@ if nvn
for
i
=
1
:
nvn
name
=
options_
.
varobs
{
estim_params_
.
nvn_observable_correspondence
(
i
,
1
)};
if
strcmp
(
field_name
,
'posterior'
)
fprintf
(
'%-*s %
7.3
f %8.4f %7.4f %
4
s %6.4f \n'
,
...
fprintf
(
'%-*s %
10.4
f %8.4f %7.4f %
6
s %6.4f \n'
,
...
header_width
,
name
,
bayestopt_
.
p1
(
ip
),
...
xparam1
(
ip
),
stdh
(
ip
),
...
pnames
{
bayestopt_
.
pshape
(
ip
)
+
1
},
...
bayestopt_
.
p2
(
ip
));
else
fprintf
(
'%-*s %
8
.4f %7.4f %7.4f \n'
,
header_width
,
name
,
xparam1
(
ip
),
...
fprintf
(
'%-*s %
10
.4f %7.4f %7.4f \n'
,
header_width
,
name
,
xparam1
(
ip
),
...
stdh
(
ip
),
tstath
(
ip
))
end
eval
([
'oo_.'
field_name
'_mode.measurement_errors_std.'
name
' = xparam1(ip);'
]);
...
...
@@ -133,11 +133,11 @@ if ncx
name
=
sprintf
(
'%s,%s'
,
M_
.
exo_names
{
k1
},
M_
.
exo_names
{
k2
});
NAME
=
sprintf
(
'%s_%s'
,
M_
.
exo_names
{
k1
},
M_
.
exo_names
{
k2
});
if
strcmp
(
field_name
,
'posterior'
)
fprintf
(
'%-*s %
7.3
f %8.4f %7.4f %
4
s %6.4f \n'
,
...
fprintf
(
'%-*s %
10.4
f %8.4f %7.4f %
6
s %6.4f \n'
,
...
header_width
,
name
,
bayestopt_
.
p1
(
ip
),
xparam1
(
ip
),
stdh
(
ip
),
...
pnames
{
bayestopt_
.
pshape
(
ip
)
+
1
},
bayestopt_
.
p2
(
ip
));
else
fprintf
(
'%-*s %
8
.4f %7.4f %7.4f \n'
,
header_width
,
name
,
xparam1
(
ip
),
...
fprintf
(
'%-*s %
10
.4f %7.4f %7.4f \n'
,
header_width
,
name
,
xparam1
(
ip
),
...
stdh
(
ip
),
tstath
(
ip
));
end
M_
.
Sigma_e
(
k1
,
k2
)
=
xparam1
(
ip
)
*
sqrt
(
M_
.
Sigma_e
(
k1
,
k1
)
*
M_
.
Sigma_e
(
k2
,
k2
));
...
...
@@ -159,11 +159,11 @@ if ncn
name
=
sprintf
(
'%s,%s'
,
M_
.
endo_names
{
k1
},
M_
.
endo_names
{
k2
});
NAME
=
sprintf
(
'%s_%s'
,
M_
.
endo_names
{
k1
},
M_
.
endo_names
{
k2
});
if
strcmp
(
field_name
,
'posterior'
)
fprintf
(
'%-*s %
7.3
f %8.4f %7.4f %
4
s %6.4f \n'
,
...
fprintf
(
'%-*s %
10.4
f %8.4f %7.4f %
6
s %6.4f \n'
,
...
header_width
,
name
,
bayestopt_
.
p1
(
ip
),
xparam1
(
ip
),
stdh
(
ip
),
...
pnames
{
bayestopt_
.
pshape
(
ip
)
+
1
},
bayestopt_
.
p2
(
ip
));
else
fprintf
(
'%-*s %
8
.4f %7.4f %7.4f \n'
,
header_width
,
name
,
xparam1
(
ip
),
...
fprintf
(
'%-*s %
10
.4f %7.4f %7.4f \n'
,
header_width
,
name
,
xparam1
(
ip
),
...
stdh
(
ip
),
tstath
(
ip
));
end
eval
([
'oo_.'
field_name
'_mode.measurement_errors_corr.'
NAME
' = xparam1(ip);'
]);
...
...
This diff is collapsed.
Click to expand it.
Johannes Pfeifer
@JohannesPfeifer
mentioned in commit
422e7dce
·
3 years ago
mentioned in commit
422e7dce
mentioned in commit 422e7dcefa58343e37703bbec5ee8875c1d2bd8c
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment