Commit f644f36e authored by MichelJuillard's avatar MichelJuillard

backward models: remove check that fails with lagged exogenous variables

parent 510a9342
......@@ -43,22 +43,18 @@ if nargin<3
else
if isdseries(innovations)
if isdseries(initialconditions)
if isequal(innovations.dates(1)-1, initialconditions.dates(end))
if innovations.nobs<samplesize
error('Time span in third argument is too short (should not be less than %s, the value of the second argument)', num2str(samplesize))
end
% Set array holding innovations values.
Innovations = zeros(samplesize, M_.exo_nbr);
exonames = M_.exo_names;
for i=1:M_.exo_nbr
if ismember(exonames{i}, innovations.name)
Innovations(:,i) = innovations{exonames{i}}.data(1:samplesize);
else
disp(sprintf('Exogenous variable %s is not available in third argument, default value is zero.', exonames{i}));
end
if innovations.nobs<samplesize
error('Time span in third argument is too short (should not be less than %s, the value of the second argument)', num2str(samplesize))
end
% Set array holding innovations values.
Innovations = zeros(samplesize, M_.exo_nbr);
exonames = M_.exo_names;
for i=1:M_.exo_nbr
if ismember(exonames{i}, innovations.name)
Innovations(:,i) = innovations{exonames{i}}.data(1:samplesize);
else
disp(sprintf('Exogenous variable %s is not available in third argument, default value is zero.', exonames{i}));
end
else
error('Time spans in first and third arguments should be contiguous!')
end
else
if isempty(initialconditions)
......
Markdown is supported
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