5 year groups

For questions regarding programming in the EViews programming language.

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

javiersan
Posts: 184
Joined: Mon Jan 19, 2009 8:18 am

5 year groups

Postby javiersan » Fri Feb 04, 2011 10:25 am

Hello,

I want to calculate the 5y average of a quarterly series without having to copy it to a multi-year page with the "mean" option. The five year groupings are defined from "today" backwards as follows:
@meansby(x,@round((@obsrange-@trend)/60))

the problem is that @round rounds to the nearest integer and I need to extract the non-fractional integer without rounding (otherwise the first block is about 2.5 years not 5).

Could you please suggest a solution?

Thanks,

Javier

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

Re: 5 year groups

Postby EViews Gareth » Fri Feb 04, 2011 10:44 am

I don't follow what you're doing there, but don't you just want @floor rather than @round?

javiersan
Posts: 184
Joined: Mon Jan 19, 2009 8:18 am

Re: 5 year groups

Postby javiersan » Fri Feb 04, 2011 10:51 am

Yes, floor does the job, thanks.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests