Variable that depends on the lags and other variables
Posted: Mon Nov 07, 2016 3:51 pm
Hi,
I have been struggling a little to figure out how to construct this really simple variable for a few states, which depends on the lag of itself and a few other variables. So, I would certainly appreciate any help on this.
The workfile sample starts from June 1985, but I really only require values from Sep 1985 for this variable.
The starting value of this variable depends on another value, which I have conveniently define it in Jun 1985, since I won't be using that observation.
This is what I have currently done, which doesn't seem all too right.
for %s a b c d e f
smpl @first+1 @last (which is Sep 1985 to the last date)
{%s}_A = {%s}_D + {%s}_C + {%s}_A(-1)*B
next
Any help would be much appreciated.
Thanks.
I have been struggling a little to figure out how to construct this really simple variable for a few states, which depends on the lag of itself and a few other variables. So, I would certainly appreciate any help on this.
The workfile sample starts from June 1985, but I really only require values from Sep 1985 for this variable.
The starting value of this variable depends on another value, which I have conveniently define it in Jun 1985, since I won't be using that observation.
This is what I have currently done, which doesn't seem all too right.
for %s a b c d e f
smpl @first+1 @last (which is Sep 1985 to the last date)
{%s}_A = {%s}_D + {%s}_C + {%s}_A(-1)*B
next
Any help would be much appreciated.
Thanks.