Page 1 of 1

Summing observations per month

Posted: Mon Jun 01, 2015 3:36 am
by student07
Hi,

I have a daily dataset, but the number of observations per month differs.

I want to calculate the sum of all observations that belong to a certain month (the result should be that I have one number per month). Is there an easy way to do this in EViews?

Thanks in advance!

Re: Summing observations per month

Posted: Mon Jun 01, 2015 6:42 am
by EViews Gareth

Code: Select all

series monthsums = @sumsby(y, @datefloor(@date, "mm"))

Re: Summing observations per month

Posted: Tue Jun 02, 2015 6:31 am
by student07

Code: Select all

series monthsums = @sumsby(y, @datefloor(@date, "mm"))
Fantastic, just what I needed, thanks a lot! :)