Page 1 of 1

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

Posted: Mon Jan 25, 2016 12:35 pm
by tvonbrasch
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

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

Posted: Mon Jan 25, 2016 12:40 pm
by EViews Gareth
There is not, but you can code it yourself fairly easily:

Code: Select all

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

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

Posted: Tue Jan 26, 2016 12:55 am
by tvonbrasch
excellent, thanks!