@condition question on preset path for endogenous variable
@condition question on preset path for endogenous variable
A question on using @condition. Is there a way to read in a preset path for an endogenous variable without using the # cards? That is, say I have preset path of an endogenous variable for 40 periods and each period the value of the endogenous variable is different. Following the example in the User Guide, it seems I would have to have 40 # cards with a different value for each period. Is there a way to read the entire 40 period time path read in @condition? Thanks.
Re: @condition question on preset path for endogenous variab
Sorry, no. It shouldn't be all that hard to modify the procedure to get the restrictions in a different form. This is the part of the procedure which processes the supplementary cards. At the end of that, var(i) is the series (by its "handle") that you want to constrain, step(i) is the # of forecast steps (1 = first period in the forecast range), and value(i) is the value constrained. The rest of the procedure is independent of how the information got in.
Code: Select all
do i=1,nconstr
if .not.general
enter var(i) step(i) value(i)
else {
dim lcomb(i)(nvar)
enter lcomb(i)
enter step(i) value(i)
}
compute step(i)=step(i)-nbeg+1
if step(i)<1 {
disp "Error: @CONDITION. Constraint" i "is before forecast start period" %datelabel(nbeg)
compute fails=1
}
if step(i)>nsteps ; compute nsteps=step(i)
end do i
if fails
return
*
if .not.%defined(steps).and..not.%defined(to)
compute nfore=nsteps
else
if %defined(to)
compute nfore=to-nbeg+1
else
compute nfore=steps