Summing observations per month

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt

student07
Posts: 18
Joined: Tue Jun 03, 2014 5:58 am

Summing observations per month

Postby student07 » Mon Jun 01, 2015 3:36 am

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!

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

Re: Summing observations per month

Postby EViews Gareth » Mon Jun 01, 2015 6:42 am

Code: Select all

series monthsums = @sumsby(y, @datefloor(@date, "mm"))
Follow us on Twitter @IHSEViews

student07
Posts: 18
Joined: Tue Jun 03, 2014 5:58 am

Re: Summing observations per month

Postby student07 » Tue Jun 02, 2015 6:31 am

EViews Gareth wrote:

Code: Select all

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


Fantastic, just what I needed, thanks a lot! :)


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 23 guests