Skip to content
Snippets Groups Projects
Commit 4b4c3db3 authored by Stéphane Adjemian's avatar Stéphane Adjemian
Browse files

Allow shocks over multiple periods in backward model routine.

parent 56d3adb7
Branches
Tags
No related merge requests found
......@@ -85,9 +85,6 @@ else
if initialconditionperiod>=shock.dates(1)
error('In experiment n°%s, the shock period must follow %s!', string(initialconditionperiod))
end
if shock.nobs>1
error('Shocks over multiple periods not implemented yet!')
end
end
end
end
......@@ -160,10 +157,12 @@ for i=1:length(listofshocks)
% Add the shock.
if deterministicshockflag
shock = listofshocks{i};
timid = shock.dates(1)-initialconditionperiod;
timid = shock.dates-initialconditionperiod;
for j=1:shock.vobs
k = find(strcmp(shock.name{i}, exonames));
innovations(timid,k) = innovations(timid,k) + shock.data(1,j);
for l=1:length(timid)
innovations(timid(l),k) = innovations(timid(l),k) + shock.data(l,j);
end
end
else
j = find(strcmp(listofshocks{i}, exonames));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment