Page 1 of 1

%IF Statement

Posted: Mon Oct 29, 2018 9:01 am
by BobR
I am using the %IF statements

set qdlfm = %if(t==1,lf,lf-(1-(7/337))*lf{1})
set qdintm = %if(t==1,1,1-(7/337))

which are intended to create, in the first statement, the series qdlfm with value of series lf at observation 1 and lf-(1-(7/337))*lf{1}) at all other observations. The second statement attempts to create a series qdintm with the value 1 at observation 1 and then 1-(7/337) at the other observations. What I get from these is the first difference of lf from the first statement and unity at all observations from the second statement. Can someone suggest how to correct these to produce the intended series? Thanks.

Re: %IF Statement

Posted: Mon Oct 29, 2018 9:33 am
by TomDoan
7.0/337.0 not 7/337. The second is an integer divide.