If a dsge-var is estimated, the posterior IRFs are computed for all
observed endogenous variables. Merge Needed. git-svn-id: https://www.dynare.org/svn/dynare/trunk@2503 ac1d8469-bf42-47a9-8791-bf33cf982152time-shift
parent
6732f6e235
commit
be73652a97
|
@ -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;
|
||||
|
||||
|
|
|
@ -39,11 +39,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;
|
||||
|
|
Loading…
Reference in New Issue