@rsum(g) row-wise sum. the sum of the rows of G.

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

tvonbrasch
Posts: 569
Joined: Fri Apr 15, 2011 5:35 am

@rsum(g) row-wise sum. the sum of the rows of G.

Postby tvonbrasch » Mon Jan 25, 2016 12:35 pm

Hi

the @rsum(g) command sums the numbers even if there are some observations that has an NA.

is there a command that returns an NA if there is one or more observations with an NA?

(if not, it would be nice if that could be an option in the @rsum command)
THomas

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

Re: @rsum(g) row-wise sum. the sum of the rows of G.

Postby EViews Gareth » Mon Jan 25, 2016 12:40 pm

There is not, but you can code it yourself fairly easily:

Code: Select all

series mysum = @recode(@robs(mygroup)=mygroup.@count, @rsum(mygroup), na)

tvonbrasch
Posts: 569
Joined: Fri Apr 15, 2011 5:35 am

Re: @rsum(g) row-wise sum. the sum of the rows of G.

Postby tvonbrasch » Tue Jan 26, 2016 12:55 am

excellent, thanks!


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests