Commit edbf3bd1 authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Remove useless calls to set_default_option

parent 2ca595aa
......@@ -11,7 +11,7 @@ function bvar_forecast(nlags)
% SPECIAL REQUIREMENTS
% none
% Copyright (C) 2007-2010 Dynare Team
% Copyright (C) 2007-2010,2012 Dynare Team
%
% This file is part of Dynare.
%
......@@ -30,7 +30,6 @@ function bvar_forecast(nlags)
global options_ oo_ M_
options_ = set_default_option(options_, 'bvar_replic', 2000);
if options_.forecast == 0
error('bvar_forecast: you must specify "forecast" option')
end
......
......@@ -11,7 +11,7 @@ function bvar_irf(nlags,identification)
% SPECIAL REQUIREMENTS
% none
% Copyright (C) 2007-2009 Dynare Team
% Copyright (C) 2007-2009,2012 Dynare Team
%
% This file is part of Dynare.
%
......@@ -34,8 +34,6 @@ if nargin==1
identification = 'Cholesky';
end
options_ = set_default_option(options_, 'bvar_replic', 2000);
[ny, nx, posterior, prior] = bvar_toolbox(nlags);
S_inv_upper_chol = chol(inv(posterior.S));
......
......@@ -42,7 +42,7 @@ function [ny, nx, posterior, prior, forecast_data] = bvar_toolbox(nlags)
% - bvar_prior_{tau,decay,lambda,mu,omega,flat,train}
% Copyright (C) 2003-2007 Christopher Sims
% Copyright (C) 2007-2011 Dynare Team
% Copyright (C) 2007-2012 Dynare Team
%
% This file is part of Dynare.
%
......@@ -66,14 +66,6 @@ dataset = read_variables(options_.datafile, options_.varobs, [], options_.xls_sh
options_ = set_default_option(options_, 'nobs', size(dataset,1)-options_.first_obs+1);
% Parameters for prior
options_ = set_default_option(options_, 'bvar_prior_tau', 3);
options_ = set_default_option(options_, 'bvar_prior_decay', 0.5);
options_ = set_default_option(options_, 'bvar_prior_lambda', 5);
options_ = set_default_option(options_, 'bvar_prior_mu', 2);
options_ = set_default_option(options_, 'bvar_prior_omega', 1);
options_ = set_default_option(options_, 'bvar_prior_flat', 0);
options_ = set_default_option(options_, 'bvar_prior_train', 0);
if options_.first_obs + options_.presample <= nlags
error('first_obs+presample should be > nlags (for initializing the VAR)')
end
......
function [dr,ys,info]=discretionary_policy_1(oo_,Instruments)
% Copyright (C) 2007-2011 Dynare Team
% Copyright (C) 2007-2012 Dynare Team
%
% This file is part of Dynare.
%
......@@ -20,10 +20,8 @@ function [dr,ys,info]=discretionary_policy_1(oo_,Instruments)
global M_ options_
persistent Hold
options_ = set_default_option(options_,'noprint',0);
options_ = set_default_option(options_,'qz_criterium',1.000001);
options_ = set_default_option(options_,'solve_maxit',3000);
options_ = set_default_option(options_,'discretion_tol',1e-7);
% safeguard against issues like running ramsey policy first and then running discretion
if isfield(M_,'orig_model')
......
function disp_moments(y,var_list)
% Displays moments of simulated variables
% Copyright (C) 2001-2011 Dynare Team
% Copyright (C) 2001-2012 Dynare Team
%
% This file is part of Dynare.
%
......@@ -80,8 +80,6 @@ if options_.nocorr == 0
end
end
ar = options_.ar;
options_ = set_default_option(options_,'ar',5);
ar = options_.ar;
if ar > 0
autocorr = [];
......
......@@ -35,7 +35,6 @@ function [x,info] = dynare_solve(func,x,jacobian_flag,varargin)
global options_
options_ = set_default_option(options_,'solve_algo',2);
info = 0;
if options_.solve_algo == 0
if ~exist('OCTAVE_VERSION')
......
......@@ -86,9 +86,20 @@ options_.steady.stop_on_error = 1;
options_.ParamSubSet = 'None';
% bvar-dsge
M_.bvar = [];
options_.dsge_var = 0;
options_.dsge_varlag = 4;
% BVAR a la Sims
options_.bvar_replic = 2000;
options_.bvar_prior_tau = 3;
options_.bvar_prior_decay = 0.5;
options_.bvar_prior_lambda = 5;
options_.bvar_prior_mu = 2;
options_.bvar_prior_omega = 1;
options_.bvar_prior_flat = 0;
options_.bvar_prior_train = 0;
% Optimization algorithm [6] gmhmaxlik
options_.Opt6Iter = 2;
options_.Opt6Numb = 5000;
......@@ -380,9 +391,6 @@ oo_.exo_det_simul = [];
M_.params = [];
M_.endo_histval = [];
% BVAR
M_.bvar = [];
% homotopy
options_.homotopy_mode = 0;
options_.homotopy_steps = 1;
......@@ -428,6 +436,7 @@ options_.initial_date.subperiod = 0;
% discretionary policy
options_.discretionary_policy = 0;
options_.discretionary_tol = 1e-7;
% Shock decomposition
options_.parameter_set = [];
......
function osr(var_list,params,i_var,W)
% Copyright (C) 2001-2010 Dynare Team
% Copyright (C) 2001-2010,2012 Dynare Team
%
% This file is part of Dynare.
%
......@@ -20,15 +20,7 @@ function osr(var_list,params,i_var,W)
global M_ options_ oo_
options_.order = 1;
options_ = set_default_option(options_,'linear',0);
options_ = set_default_option(options_,'ar',5);
options_ = set_default_option(options_,'irf',40);
options_ = set_default_option(options_,'drop',100);
options_ = set_default_option(options_,'replic',1);
options_ = set_default_option(options_,'nomoments',0);
options_ = set_default_option(options_,'nocorr',0);
options_ = set_default_option(options_,'hp_filter',0);
options_ = set_default_option(options_,'hp_ngrid',512);
options_ = set_default_option(options_,'simul',0);
options_ = set_default_option(options_,'periods',1);
......
......@@ -5,7 +5,7 @@ function AutoCOR_YRk=PCL_Part_info_moments( H, varobs, dr,ivar)
% Pearlman, Currie and Levine 1986 solution.
% 22/10/06 - Version 2 for new Riccati with 4 params instead 5
% Copyright (C) 2006-2011 Dynare Team
% Copyright (C) 2006-2012 Dynare Team
%
% This file is part of Dynare.
%
......@@ -166,8 +166,6 @@ else
COR_Y=[];
end
ar = options_.ar;
options_ = set_default_option(options_,'ar',5);
ar = options_.ar;
if ar > 0
COV_YRk= zeros(nn,ar);
......
......@@ -25,7 +25,7 @@ function [dr,info]=PCL_resol(ys,check_flag)
% SPECIAL REQUIREMENTS
% none
% Copyright (C) 2001-2011 Dynare Team
% Copyright (C) 2001-2012 Dynare Team
%
% This file is part of Dynare.
%
......@@ -47,7 +47,6 @@ global it_
jacobian_flag = 0;
options_ = set_default_option(options_,'jacobian_flag',1);
info = 0;
it_ = M_.maximum_lag + 1 ;
......
......@@ -40,7 +40,7 @@ function [dr,info,M_,options_,oo_] = dr1_PI(dr,task,M_,options_,oo_)
% none.
%
% Copyright (C) 1996-2011 Dynare Team
% Copyright (C) 1996-2012 Dynare Team
%
% This file is part of Dynare.
%
......@@ -60,10 +60,6 @@ function [dr,info,M_,options_,oo_] = dr1_PI(dr,task,M_,options_,oo_)
global lq_instruments;
info = 0;
options_ = set_default_option(options_,'loglinear',0);
options_ = set_default_option(options_,'noprint',0);
options_ = set_default_option(options_,'olr',0);
options_ = set_default_option(options_,'olr_beta',1);
options_ = set_default_option(options_,'qz_criterium',1.000001);
xlen = M_.maximum_endo_lead + M_.maximum_endo_lag + 1;
......
......@@ -12,7 +12,7 @@ function simul
% SPECIAL REQUIREMENTS
% none
% Copyright (C) 1996-2011 Dynare Team
% Copyright (C) 1996-2012 Dynare Team
%
% This file is part of Dynare.
%
......@@ -55,7 +55,6 @@ if size(M_.lead_lag_incidence,2)-nnz(M_.lead_lag_incidence(M_.maximum_endo_lag+1
error (mess) ;
end
options_ = set_default_option(options_,'periods',0);
if options_.periods == 0
error('SIMUL: number of periods for the simulation isn''t specified')
end
......
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