Page 1 of 1

Sum series including NA

Posted: Fri Apr 11, 2014 7:02 am
by Julia336699
Hello,
how can I sum series including NAs and finally divide r_Sum by the included available observations in a loop?
Here you can see my example:
year r1 r2 r3 r_Sum Division by included amount of observations (r_Sum/n_included)
1992 NA NA 0.2 0.2 0.2/1
1993 NA NA -0.4 -0.4 0.1/1
1994 NA 0.4 0.4 0.8 0.8/2
1995 0.2 0.4 -0.5 0.1 0.1/3

Thanks for your answer :D

Re: Sum series including NA

Posted: Fri Apr 11, 2014 7:45 am
by EViews Gareth
Put the series in a group, then use the @rmean function. (or, if you want to calculate it manually, @rsum and @robs)

Re: Sum series including NA

Posted: Fri Apr 11, 2014 8:37 am
by Julia336699
Thanks a lot.