Variable that depends on the lags and other variables

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

jacarandas
Posts: 20
Joined: Tue Feb 10, 2015 10:11 pm

Variable that depends on the lags and other variables

Postby jacarandas » 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.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

Re: Variable that depends on the lags and other variables

Postby EViews Gareth » Mon Nov 07, 2016 6:00 pm

There's nothing obviously wrong with the code you have.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests