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.
Replacing NAs in multiple series
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Replacing NAs in multiple series
Code: Select all
%serieslist = @wlookup("*", "series")
for %i {%serieslist}
{%i} = @recode({%i}=na, 0, {%i})
next
Who is online
Users browsing this forum: No registered users and 2 guests
