Page 1 of 1

Loop that uses exclude?

Posted: Mon Jun 27, 2016 11:13 am
by chester
Okay so my data is formatted with time periods (years) as rows and variables as columns.
I'd like EViews to determine the first year with incomplete data ('NA' values in the row), and solve for the missing values.
Then I would like it to solve normally for the years thereafter.
However, I do NOT want EViews to solve and overwrite the values for variables which DO have values.
I understand you must use the 'exclude' term but how can I write this as a loop which can be applied to any group of series?

In pseudocode:

Code: Select all

row = 0 for row <= last row if row contains missing values solve for all cells that contain 'NA' exclude all cells that contain values else solve normally row = row + 1 next exit

Re: Loop that uses exclude?

Posted: Mon Jun 27, 2016 11:23 am
by EViews Gareth
Not exactly sure what you're asking, but I think you just want to use the actexist=t option on exclude:
http://www.eviews.com/help/helpintro.ht ... 23ww215852

Re: Loop that uses exclude?

Posted: Tue Jun 28, 2016 11:52 am
by chester
Right now I manually exclude variables for the year 2015 because we have actual values for them. I only want to forecast values for that year which we do NOT have. How can I use the 'actexist=true' option so that EViews can determine what is the latest year with incomplete data and then automatically exclude variables with actual values?

So far, this is what I do to forecast x.

Code: Select all

x.exclude ik("2015 2015") xk("2015 2015") mk("2015 2015") invk("2015 2015") gck("2015 2015")

Re: Loop that uses exclude?

Posted: Tue Jun 28, 2016 12:18 pm
by EViews Gareth

Code: Select all

X.exlude(actexisit=t)