Loop that uses exclude?
Posted: Mon Jun 27, 2016 11:13 am
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:
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