Skip to content
Snippets Groups Projects
Commit 2ce93010 authored by stepan's avatar stepan
Browse files

Merged commit 2503 (from trunk).

git-svn-id: https://www.dynare.org/svn/dynare/branches/4.0@2504 ac1d8469-bf42-47a9-8791-bf33cf982152
parent 787e03ec
Branches
Tags
No related merge requests found
......@@ -14,7 +14,7 @@ function varlist = check_list_of_variables(options_, M_, varlist)
%
% SPECIAL REQUIREMENTS
% Copyright (C) 2003-2008 Dynare Team
% Copyright (C) 2003-2009 Dynare Team
%
% This file is part of Dynare.
%
......@@ -31,6 +31,28 @@ function varlist = check_list_of_variables(options_, M_, varlist)
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
if options_.bvar_dsge && options_.bayesian_irf
if ~isempty(varlist)
for i=1:size(varlist,1)
idx = strmatch(deblank(varlist(i,:)),options_.varobs,'exact');
if isempty(idx)
disp([varlist(i,:) ' is not an observed variable!']);
message = 1;
end
end
if size(varlist,1)~=size(options_.varobs)
message = 1;
end
if message
disp(' ')
disp('Posterior IRFs will be computed for all observed variables.')
disp(' ')
end
end
varlist = options_.varobs;
return
end
if isempty(varlist)
disp(' ')
disp(['You did not declare endogenous variables after the estimation command.'])
......
......@@ -30,6 +30,11 @@ function dynare_estimation(var_list,varargin)
global options_ oo_ M_ oo_recursive_
%% Decide if a DSGE or DSGE-VAR has to be estimated.
if ~isempty(strmatch('dsge_prior_weight',M_.param_names))
options_.bvar_dsge = 1;
end
var_list = check_list_of_variables(options_, M_, var_list);
options_.varlist = var_list;
......
......@@ -44,11 +44,6 @@ for i = 1:size(M_.endo_names,1)
end
end
%% Decide if a DSGE or DSGE-VAR has to be estimated.
if ~isempty(strmatch('dsge_prior_weight',M_.param_names))
options_.bvar_dsge = 1;
end
%% Set the order of approximation to one (if needed).
if options_.order > 1
options_.order = 1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment