Delete element from series

For questions regarding programming in the EViews programming language.

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

facosta
Posts: 23
Joined: Wed Jul 07, 2010 9:16 am

Delete element from series

Postby facosta » Tue Feb 15, 2011 8:53 am

Hello there. Thanks again for the help.
I wanted to ask how can I delete a particular element from a series if that element is a "NA".
It happens that I need to structure the workfile with a date series I am importing from excel and before that I need to drop all the "NAs" from the date series.
I was trying domething like this:

for !i=21 to @rows(Date)
if Date(!i)=NA then
Delete Date(!i)
endif
next

But it doesn´t work.
Can anyone tell me how can I do this?
Thanks!

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

Re: Delete element from series

Postby EViews Gareth » Tue Feb 15, 2011 8:55 am

use the pagecontract command.

facosta
Posts: 23
Joined: Wed Jul 07, 2010 9:16 am

Re: Delete element from series

Postby facosta » Tue Feb 15, 2011 9:43 am

Thanks! it worked perfectly.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests