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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dóra Kocsis
dynare
Commits
d7c06ead
Commit
d7c06ead
authored
13 years ago
by
Houtan Bastani
Browse files
Options
Downloads
Patches
Plain Diff
ms-sbvar bugfix: replace shocks with shocks_per_parameter
parent
d22b86c2
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
matlab/ms-sbvar/ms_variance_decomposition.m
+4
-4
4 additions, 4 deletions
matlab/ms-sbvar/ms_variance_decomposition.m
mex/sources/ms-sbvar/mex_ms_sbvar.cc
+2
-2
2 additions, 2 deletions
mex/sources/ms-sbvar/mex_ms_sbvar.cc
with
6 additions
and
6 deletions
matlab/ms-sbvar/ms_variance_decomposition.m
+
4
−
4
View file @
d7c06ead
...
...
@@ -57,22 +57,22 @@ if options_.ms.median
end
[
err
,
vd
]
=
mex_ms_variance_decomposition
([
opt
(:)
', {{'
free_parameters
'
,
oo_
.
ms
.
maxparams
},
...
{
'shocks'
,
options_
.
ms
.
shock_draws
}}]);
{
'shocks
_per_parameter
'
,
options_
.
ms
.
shock_draws
}}]);
mexErrCheck
(
'mex_ms_variance_decomposition ergodic '
,
err
);
plot_ms_variance_decomposition
(
M_
,
options_
,
vd
,
'Ergodic Variance Decomposition'
,
options_
.
graph_save_formats
,
options_
.
TeX
);
[
err
,
regime_vd
]
=
mex_ms_variance_decomposition
([
opt
(:)
', {{'
free_parameters
'
,
oo_
.
ms
.
maxparams
},
...
{
'shocks'
,
options_
.
ms
.
shock_draws
},
{
'regimes'
}}]);
{
'shocks
_per_parameter
'
,
options_
.
ms
.
shock_draws
},
{
'regimes'
}}]);
mexErrCheck
(
'mex_ms_variance_decomposition ergodic regimes'
,
err
);
save
([
vddir
filesep
'ergodic_vd.mat'
],
'vd'
,
'regime_vd'
);
if
exist
(
options_
.
ms
.
mh_file
,
'file'
)
>
0
[
err
,
vd
]
=
mex_ms_variance_decomposition
([
opt
(:)
', {{'
simulation_file
'
,
options_
.
ms
.
mh_file
},
...
{
'shocks'
,
options_
.
ms
.
shocks_per_parameter
},
{
'parameter_uncertainty'
}}]);
{
'shocks
_per_parameter
'
,
options_
.
ms
.
shocks_per_parameter
},
{
'parameter_uncertainty'
}}]);
mexErrCheck
(
'mex_ms_variance_decomposition bayesian '
,
err
);
[
err
,
regime_vd
]
=
mex_ms_variance_decomposition
([
opt
(:)
', {{'
simulation_file
'
,
options_
.
ms
.
mh_file
},
...
{
'shocks'
,
options_
.
ms
.
shocks_per_parameter
},
{
'parameter_uncertainty'
},
{
'regimes'
}}]);
{
'shocks
_per_parameter
'
,
options_
.
ms
.
shocks_per_parameter
},
{
'parameter_uncertainty'
},
{
'regimes'
}}]);
mexErrCheck
(
'mex_ms_variance_decomposition bayesian regimes '
,
err
);
save
([
vddir
filesep
'bayesian_vd.mat'
],
'vd'
,
'regime_vd'
);
end
...
...
This diff is collapsed.
Click to expand it.
mex/sources/ms-sbvar/mex_ms_sbvar.cc
+
2
−
2
View file @
d7c06ead
...
...
@@ -276,7 +276,7 @@ convert_free_parameters_to_VAR(TStateModel *model, double *free_parameters, doub
Apply parameter uncertainty when computing error bands or median. When set,
will default shocks = 1
'shocks' or
'shocks_per_parameter', <integer>
'shocks_per_parameter', <integer>
Number of regime paths to draw for each parameter draw. The default value
is 1 if parameter_uncertainty is set and 10,000 otherwise.
...
...
@@ -436,7 +436,7 @@ set_options(SbvarOption *options, const mxArray *prhs[])
}
else
{
cout
<<
"You must pass an integer after specifying the 'shocks' option"
<<
endl
;
cout
<<
"You must pass an integer after specifying the 'shocks
_per_parameter
' option"
<<
endl
;
return
1
;
}
else
if
(
option_name
==
"thin"
)
...
...
This diff is collapsed.
Click to expand it.
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