Replacing NAs in multiple series

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason

kaywu814
Posts: 3
Joined: Tue Nov 13, 2012 9:39 am

Replacing NAs in multiple series

Postby kaywu814 » Tue Nov 13, 2012 9:42 am

Hi,

I am cleaning a dataset and am having an issue where I would like to replace NAs in multiple series with 0's instead. Is there a quick and easy way to do this (perhaps with a loop) instead of using @recode for each individual variable?

For example, instead of using

X=@recode(X=na,0,X)

we would like to have a loop that replaces NAs with 0's in all our series.

Thanks in advance.

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

Re: Replacing NAs in multiple series

Postby EViews Gareth » Tue Nov 13, 2012 9:57 am

Code: Select all

%serieslist = @wlookup("*", "series") for %i {%serieslist} {%i} = @recode({%i}=na, 0, {%i}) next


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests