How to sum columns whith NA within groups?

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

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

lpando08
Posts: 29
Joined: Tue Apr 03, 2018 1:13 pm

How to sum columns whith NA within groups?

Postby lpando08 » Mon Jul 16, 2018 10:34 pm

Hello, I have two groups

group1 resid1 resid2 resid3 resid4

group2 resid5 resid6 resid resid8

I want to sum resid1 and resid5, I mean the first row of resid1 and the first row of resid5 and so as it. But there are NAs sometimes in both series and when I sum by rows a number and a NA, the result is like this "number + NA= NA ". How i can obtain "number+NA=number".

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

Re: How to sum columns whith NA within groups?

Postby EViews Gareth » Tue Jul 17, 2018 7:31 am

The @rsum function does not propagate NAs.
Follow us on Twitter @IHSEViews


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 11 guests