Commit d7c06ead authored by Houtan Bastani's avatar Houtan Bastani
Browse files

ms-sbvar bugfix: replace shocks with shocks_per_parameter

parent d22b86c2
...@@ -57,22 +57,22 @@ if options_.ms.median ...@@ -57,22 +57,22 @@ if options_.ms.median
end end
[err, vd] = mex_ms_variance_decomposition([opt(:)', {{'free_parameters',oo_.ms.maxparams}, ... [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); mexErrCheck('mex_ms_variance_decomposition ergodic ', err);
plot_ms_variance_decomposition(M_,options_,vd, 'Ergodic Variance Decomposition',options_.graph_save_formats,options_.TeX); 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}, ... [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); mexErrCheck('mex_ms_variance_decomposition ergodic regimes', err);
save([vddir filesep 'ergodic_vd.mat'], 'vd', 'regime_vd'); save([vddir filesep 'ergodic_vd.mat'], 'vd', 'regime_vd');
if exist(options_.ms.mh_file,'file') > 0 if exist(options_.ms.mh_file,'file') > 0
[err, vd] = mex_ms_variance_decomposition([opt(:)', {{'simulation_file',options_.ms.mh_file}, ... [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); mexErrCheck('mex_ms_variance_decomposition bayesian ', err);
[err, regime_vd] = mex_ms_variance_decomposition([opt(:)', {{'simulation_file',options_.ms.mh_file}, ... [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); mexErrCheck('mex_ms_variance_decomposition bayesian regimes ', err);
save([vddir filesep 'bayesian_vd.mat'], 'vd', 'regime_vd'); save([vddir filesep 'bayesian_vd.mat'], 'vd', 'regime_vd');
end end
......
...@@ -276,7 +276,7 @@ convert_free_parameters_to_VAR(TStateModel *model, double *free_parameters, doub ...@@ -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, Apply parameter uncertainty when computing error bands or median. When set,
will default shocks = 1 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 Number of regime paths to draw for each parameter draw. The default value
is 1 if parameter_uncertainty is set and 10,000 otherwise. is 1 if parameter_uncertainty is set and 10,000 otherwise.
...@@ -436,7 +436,7 @@ set_options(SbvarOption *options, const mxArray *prhs[]) ...@@ -436,7 +436,7 @@ set_options(SbvarOption *options, const mxArray *prhs[])
} }
else 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; return 1;
} }
else if (option_name == "thin") else if (option_name == "thin")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment