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

Clean-up last remnants of unit_root_vars (Closes: #167)

parent 3a8bfb4e
......@@ -276,39 +276,6 @@ else
bayestopt_.smoother_var_list);
end;
% Initialization with unit-root variables.
if ~isempty(options_.unit_root_vars)
n_ur = size(options_.unit_root_vars,1);
i_ur = zeros(n_ur,1);
for i=1:n_ur
i1 = strmatch(deblank(options_.unit_root_vars(i,:)),M_.endo_names(dr.order_var,:),'exact');
if isempty(i1)
error('Undeclared variable in unit_root_vars statement')
end
i_ur(i) = i1;
end
bayestopt_.var_list_stationary = setdiff((1:M_.endo_nbr)',i_ur);
[junk,bayestopt_.restrict_var_list_nonstationary] = ...
intersect(oo_.dr.restrict_var_list,i_ur);
bayestopt_.restrict_var_list_stationary = ...
setdiff((1:length(oo_.dr.restrict_var_list))', ...
bayestopt_.restrict_var_list_nonstationary);
if M_.maximum_lag > 1
l1 = flipud([cumsum(M_.lead_lag_incidence(1:M_.maximum_lag-1,dr.order_var),1);ones(1,M_.endo_nbr)]);
l2 = l1(:,oo_.dr.restrict_var_list);
il2 = find(l2' > 0);
l2(il2) = (1:length(il2))';
bayestopt_.restrict_var_list_stationary = ...
nonzeros(l2(:,bayestopt_.restrict_var_list_stationary));
bayestopt_.restrict_var_list_nonstationary = ...
nonzeros(l2(:,bayestopt_.restrict_var_list_nonstationary));
end
if options_.lik_init==1
options_.lik_init = 3;
end
end % if ~isempty(options_.unit_root_vars)
% Test if the data file is declared.
if isempty(options_.datafile)
if gsa_flag
......
......@@ -189,7 +189,6 @@ options_.prior_trunc = 1e-10;
options_.smoother = 0;
options_.student_degrees_of_freedom = 3;
options_.subdraws = [];
options_.unit_root_vars = [];
options_.use_mh_covariance_matrix = 0;
options_.gradient_method = 2;
options_.gradient_epsilon = 1e-6;
......
......@@ -17,7 +17,7 @@ function [ivar,vartan,options_] = set_stationary_variables_list(options_,M_)
% SPECIAL REQUIREMENTS
% None.
% Copyright (C) 2007-2010 Dynare Team
% Copyright (C) 2007-2011 Dynare Team
%
% This file is part of Dynare.
%
......@@ -40,20 +40,7 @@ if isempty(varlist)
options_.varlist = varlist;
end
nvar = rows(varlist);
if ~isempty(options_.unit_root_vars)
vartan = [];
for i=1:nvar
if isempty(strmatch(deblank(varlist(i,:)),options_.unit_root_vars,'exact'))
if isempty(vartan)
vartan = varlist(i,:);
else
vartan = char(vartan,varlist(i,:));
end
end
end
else
vartan = varlist;
end
vartan = varlist;
nvar = size(vartan,1);
ivar = zeros(nvar,1);
for i = 1:nvar
......
......@@ -371,17 +371,6 @@ RplotStatement::writeOutput(ostream &output, const string &basename) const
output << "rplot(var_list_);\n";
}
UnitRootVarsStatement::UnitRootVarsStatement(const SymbolList &symbol_list_arg) :
symbol_list(symbol_list_arg)
{
}
void
UnitRootVarsStatement::writeOutput(ostream &output, const string &basename) const
{
symbol_list.writeOutput("options_.unit_root_vars", output);
}
PeriodsStatement::PeriodsStatement(int periods_arg) : periods(periods_arg)
{
}
......
......@@ -126,15 +126,6 @@ public:
virtual void writeOutput(ostream &output, const string &basename) const;
};
class UnitRootVarsStatement : public Statement
{
private:
const SymbolList symbol_list;
public:
UnitRootVarsStatement(const SymbolList &symbol_list_arg);
virtual void writeOutput(ostream &output, const string &basename) const;
};
class PeriodsStatement : public Statement
{
private:
......
......@@ -1163,7 +1163,7 @@ ParsingDriver::estimated_params_bounds()
void
ParsingDriver::set_unit_root_vars()
{
mod_file->addStatement(new UnitRootVarsStatement(symbol_list));
warning("'unit_root_vars' is now obsolete and has no effect; use option 'diffuse_filter' of 'estimation' instead");
symbol_list.clear();
}
......
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