Make evaluate_smoother.m output former global variables for correct updating of these objects
parent
61ee4e123c
commit
5707b4d965
|
@ -1,4 +1,4 @@
|
|||
function [oo_, Smoothed_variables_declaration_order_deviation_form]=evaluate_smoother(parameters,var_list,M_,oo_,options_,bayestopt_,estim_params_)
|
||||
function [oo_,options_,bayestopt_,Smoothed_variables_declaration_order_deviation_form]=evaluate_smoother(parameters,var_list,M_,oo_,options_,bayestopt_,estim_params_)
|
||||
% Evaluate the smoother at parameters.
|
||||
%
|
||||
% INPUTS
|
||||
|
@ -26,6 +26,8 @@ function [oo_, Smoothed_variables_declaration_order_deviation_form]=evaluate_smo
|
|||
% order of declaration of variables (M_.endo_names)
|
||||
% in deviations from their respective mean, i.e.
|
||||
% without trend and constant part (used for shock_decomposition)
|
||||
% o options_ [structure] Options; returns options_.first_obs
|
||||
% o bayestopt_ [structure] describing the priors; returns fields like bayestopt_.smoother_var_list from the smoother
|
||||
%
|
||||
% SPECIAL REQUIREMENTS
|
||||
% None
|
||||
|
@ -103,7 +105,7 @@ end
|
|||
DsgeSmoother(parameters,dataset_.nobs,transpose(dataset_.data),dataset_info.missing.aindex,dataset_info.missing.state,M_,oo_,options_,bayestopt_,estim_params_);
|
||||
[oo_]=store_smoother_results(M_,oo_,options_,bayestopt_,dataset_,dataset_info,atT,innov,measurement_error,updated_variables,ys,trend_coeff,aK,P,PK,decomp,Trend,state_uncertainty);
|
||||
|
||||
if nargout==2
|
||||
if nargout==4
|
||||
Smoothed_variables_declaration_order_deviation_form=atT(oo_.dr.inv_order_var(bayestopt_.smoother_var_list),:);
|
||||
end
|
||||
|
||||
|
|
|
@ -66,8 +66,9 @@ if isempty(parameter_set)
|
|||
end
|
||||
end
|
||||
|
||||
|
||||
options_.selected_variables_only = 0; %make sure all variables are stored
|
||||
[oo,Smoothed_Variables_deviation_from_mean] = evaluate_smoother(parameter_set,varlist,M_,oo_,options_,bayestopt_,estim_params_);
|
||||
[oo,junk1,junk2,Smoothed_Variables_deviation_from_mean] = evaluate_smoother(parameter_set,varlist,M_,oo_,options_,bayestopt_,estim_params_);
|
||||
|
||||
% reduced form
|
||||
dr = oo.dr;
|
||||
|
|
|
@ -3171,7 +3171,7 @@ CalibSmootherStatement::writeOutput(ostream &output, const string &basename, boo
|
|||
symbol_list.writeOutput("var_list_", output);
|
||||
output << "options_.smoother = 1;" << endl;
|
||||
output << "options_.order = 1;" << endl;
|
||||
output << "evaluate_smoother('calibration',var_list_,M_,oo_,options_,bayestopt_,estim_params_);" << endl;
|
||||
output << "[oo_,options_,bayestopt_]=evaluate_smoother('calibration',var_list_,M_,oo_,options_,bayestopt_,estim_params_);" << endl;
|
||||
}
|
||||
|
||||
ExtendedPathStatement::ExtendedPathStatement(const OptionsList &options_list_arg)
|
||||
|
|
Loading…
Reference in New Issue