Hello,
I have a series with data on a weekly frequency and would like to calculate a new series which has for each weekly point the average of the series for the month (series_m)
The result would be something like:
Date series series_m
1-Jan-09 2.0 4.0
8-Jan-09 5.0 4.0
15-Jan-09 4.0 4.0
22-Jan-09 5.0 4.0
29-Jan-09 4.0 4.0
5-Feb-09 6.0 5.0
12-Feb-09 3.0 5.0
19-Feb-09 4.0 5.0
26-Feb-09 7.0 5.0
One way of doing this I guess is to run through each of the months in the series using a for...next, change the sample and calculate series_m=@mean(series[,s]). However, is there a way to calculate this using one or two formulas and not a loop or sample changing?
Thanks,
Javier
Calculate period averages
Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator
Re: Calculate period averages
I found the solution:
series series_m=@meansby(series,@month(series),@year(series))
series series_m=@meansby(series,@month(series),@year(series))
Who is online
Users browsing this forum: No registered users and 19 guests