Page 1 of 1

Delete series

Posted: Mon Dec 16, 2013 6:39 am
by Gina
Hi, I've got the following problem: I'd like to delete all series-objects, which contain for every observation the value 0.

Here an example:

series_object_1 contains the following values:
1986 1
1987 2
1988 0
1989 0
1990 0

series_object_2 contains the following values:
1986 0
1987 0
1988 0
1989 0
1990 0

So, I'd like to tell EViews to delete series_object_2 as it contains for every observation the value 0.

Is there any possiblity to do this? I already tried different ways, but these didn't work.
For example I tried to use the if-condition like this:

!i = 1 to 2
if series_Object_{!i} = 0
then delete series_object_{!i}
!i = !i
endif

Actually this possibility didn't work. It would be great, if you could help me concerning this problem.
Thanks a lot in advance!

Re: Delete series

Posted: Mon Dec 16, 2013 9:29 am
by EViews Gareth

Code: Select all

for !i = 1 to 2 if @mean(series_Object_{!i}) and @stdev(series_object_{!i}) = 0 then delete series_object_{!i} endif next