I guess I was too optimistic
Here's (part of) my code:
Code: Select all
procedure nowcastwithmM ne
*
option integer ftime
option integer fsteps 3
option switch addf 0
*
local int neqn k
local model lmod
local vec[ser] fcs
local vec[int] af
local vec[equ] eqnlist
*
if eqninput.and..not.%defined(ne) {
disp "Please enter the number of equations behind the procedure name!"
return
}
*
comp neqn = ne
dim af(neqn)
*
dim eqnlist(neqn)
do k=1,neqn
enter eqnlist(k)
end do
if addf {
enter(varying,entries=naf) af
if naf<>neqn {
disp "Number of add-factors does not correspond to number of equations in the model!"
return
}
}
else {
do k=1,neqn
set af(k) ftime ftime+fsteps-1 = 0.0
end do
}
*
do k=1,neqn
if k==1
group lmod eqnlist(k)
else
comp lmod = lmod + eqnlist(k)
end do
*
forecast(print=print,model=lmod,from=ftime,steps=fsteps,results=fcs,path) *
# af
*
decl vec[ser] %mFCS(neqn)
do k=1,neqn
set %mFCS(k) ftime ftime+fsteps-1 = fcs(k)(t)
end do k
*
end procedure
When running, RATS would promt the error message
Code: Select all
## EQ3. Equation zÚ Has Not Been Defined
The Error Occurred At Location 0830 of NOWCASTWITHMM
Line 66 of NOWCASTWITHMM
(It's the forecast-command that is causing problems; the line number does not corrspond as I deleted some unimportant pieces from the code.)
The problem seems to be that the equations are not properly held by the eqnlist-array.
Best regards, Jonas