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
frequency convert 2month
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
-
EViews Chris
- EViews Developer
- Posts: 161
- Joined: Wed Sep 17, 2008 10:39 am
Re: frequency convert 2month
There's a few ways to do this. Here's one:
where the expression involving @mod is just a shorter way of writing: month=2 or month=5 or month=8 or month=11.
Code: Select all
copy(smpl="if @mod(@month-1,3)=1") MData\* QData\* -
EViews Chris
- EViews Developer
- Posts: 161
- Joined: Wed Sep 17, 2008 10:39 am
Re: frequency convert 2month
And note that that one way of writing a sample for the first two months of the quarter is:
where the equality has been replaced by an inequality
Code: Select all
if @mod(@month-1,3)<=1Who is online
Users browsing this forum: No registered users and 2 guests
