Removed persistent variables.
parent
76e3c6ca68
commit
4e0deb7987
|
@ -1 +1 @@
|
||||||
list_of_functions = {'discretionary_policy_1', 'dsge_var_likelihood', 'dyn_first_order_solver', 'dyn_waitbar', 'ep_residuals', 'evaluate_likelihood', 'prior_draw_gsa', 'identification_analysis', 'computeDLIK', 'univariate_computeDLIK', 'metropolis_draw', 'flag_implicit_skip_nan', 'moment_function', 'non_linear_dsge_likelihood', 'mr_hessian', 'masterParallel', 'auxiliary_initialization', 'auxiliary_particle_filter', 'conditional_filter_proposal', 'conditional_particle_filter', 'gaussian_filter', 'gaussian_filter_bank', 'gaussian_mixture_filter', 'gaussian_mixture_filter_bank', 'Kalman_filter', 'online_auxiliary_filter', 'sequential_importance_particle_filter', 'solve_model_for_online_filter', 'perfect_foresight_simulation', 'prior_draw', 'priordens', 'smm_objective'};
|
list_of_functions = {'discretionary_policy_1', 'dsge_var_likelihood', 'dyn_first_order_solver', 'dyn_waitbar', 'ep_residuals', 'evaluate_likelihood', 'prior_draw_gsa', 'identification_analysis', 'computeDLIK', 'univariate_computeDLIK', 'metropolis_draw', 'flag_implicit_skip_nan', 'moment_function', 'mr_hessian', 'masterParallel', 'auxiliary_initialization', 'auxiliary_particle_filter', 'conditional_filter_proposal', 'conditional_particle_filter', 'gaussian_filter', 'gaussian_filter_bank', 'gaussian_mixture_filter', 'gaussian_mixture_filter_bank', 'Kalman_filter', 'online_auxiliary_filter', 'sequential_importance_particle_filter', 'solve_model_for_online_filter', 'perfect_foresight_simulation', 'prior_draw', 'priordens', 'smm_objective'};
|
|
@ -43,11 +43,6 @@ function [fval,info,exit_flag,DLIK,Hess,ys,trend_coeff,Model,DynareOptions,Bayes
|
||||||
% You should have received a copy of the GNU General Public License
|
% You should have received a copy of the GNU General Public License
|
||||||
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
|
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
% Declaration of the penalty as a persistent variable.
|
|
||||||
persistent init_flag
|
|
||||||
persistent restrict_variables_idx observed_variables_idx state_variables_idx mf0 mf1
|
|
||||||
persistent sample_size number_of_state_variables number_of_observed_variables number_of_structural_innovations
|
|
||||||
|
|
||||||
% Initialization of the returned arguments.
|
% Initialization of the returned arguments.
|
||||||
fval = [];
|
fval = [];
|
||||||
ys = [];
|
ys = [];
|
||||||
|
@ -174,19 +169,15 @@ Y = transpose(DynareDataset.data);
|
||||||
% 3. Initial condition of the Kalman filter
|
% 3. Initial condition of the Kalman filter
|
||||||
%------------------------------------------------------------------------------
|
%------------------------------------------------------------------------------
|
||||||
|
|
||||||
% Set persistent variables (first call).
|
mf0 = BayesInfo.mf0;
|
||||||
if isempty(init_flag)
|
mf1 = BayesInfo.mf1;
|
||||||
mf0 = BayesInfo.mf0;
|
restrict_variables_idx = dr.restrict_var_list;
|
||||||
mf1 = BayesInfo.mf1;
|
observed_variables_idx = restrict_variables_idx(mf1);
|
||||||
restrict_variables_idx = dr.restrict_var_list;
|
state_variables_idx = restrict_variables_idx(mf0);
|
||||||
observed_variables_idx = restrict_variables_idx(mf1);
|
sample_size = size(Y,2);
|
||||||
state_variables_idx = restrict_variables_idx(mf0);
|
number_of_state_variables = length(mf0);
|
||||||
sample_size = size(Y,2);
|
number_of_observed_variables = length(mf1);
|
||||||
number_of_state_variables = length(mf0);
|
number_of_structural_innovations = length(Q);
|
||||||
number_of_observed_variables = length(mf1);
|
|
||||||
number_of_structural_innovations = length(Q);
|
|
||||||
init_flag = 1;
|
|
||||||
end
|
|
||||||
|
|
||||||
ReducedForm.ghx = dr.ghx(restrict_variables_idx,:);
|
ReducedForm.ghx = dr.ghx(restrict_variables_idx,:);
|
||||||
ReducedForm.ghu = dr.ghu(restrict_variables_idx,:);
|
ReducedForm.ghu = dr.ghu(restrict_variables_idx,:);
|
||||||
|
|
Loading…
Reference in New Issue