frequency convert 2month

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason

Katjes
Posts: 58
Joined: Thu Oct 02, 2008 5:46 am

frequency convert 2month

Postby Katjes » Wed Feb 24, 2010 6:01 am

Hi all,
I'm trying to convert monthly to quarterly frequency, but not to take the simply average, ... this is to easy ;o)
copy(c=na,smpl="1991 2011") MData\* QData\*

My current problem is construct the quarterly value by
1) the 2nd month of a quarter only (Is there a command similar to c=second?)
or
2) the average of the 1st and 2nd month( c=average(1+2)?)

I thougt about an "ifsample" condition, but didn't find an answer so far?
Anybody have already solved this problem?
Thanks in advance, Katjes

EViews Chris
EViews Developer
Posts: 161
Joined: Wed Sep 17, 2008 10:39 am

Re: frequency convert 2month

Postby EViews Chris » Mon Mar 01, 2010 3:35 pm

There's a few ways to do this. Here's one:

Code: Select all

copy(smpl="if @mod(@month-1,3)=1") MData\* QData\*
where the expression involving @mod is just a shorter way of writing: month=2 or month=5 or month=8 or month=11.

EViews Chris
EViews Developer
Posts: 161
Joined: Wed Sep 17, 2008 10:39 am

Re: frequency convert 2month

Postby EViews Chris » Mon Mar 01, 2010 3:40 pm

And note that that one way of writing a sample for the first two months of the quarter is:

Code: Select all

if @mod(@month-1,3)<=1
where the equality has been replaced by an inequality


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests