Is there an easy way to create a series which averages a daily series over, say five years, based on specific month and day, but varying the year.
E.g. average of values related to 1/1/2015, 1/1/2016, 1/1/2017, 1/1/2018, 1/1/2019 ?
And then the next series member would be the average of 2/1/2015 and so on.
Creating an averaged time series over day and month per year
Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator
-
- Posts: 5
- Joined: Mon Dec 21, 2020 9:47 am
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13319
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Creating an averaged time series over day and month per year
Probably, but you'll need to explain in more detail what you want.
Follow us on Twitter @IHSEViews
-
- Posts: 5
- Joined: Mon Dec 21, 2020 9:47 am
Re: Creating an averaged time series over day and month per year
Very simple: I have daily values for 5 different years and want to create a series averaging the years for the same days and months, similar to the averageifs function in MS Excel.
The specific issue is averaging temperatures for the 1 Jan, then 2 Jan and so on always over a five years period. The time series would then be a representative value for each day.
The specific issue is averaging temperatures for the 1 Jan, then 2 Jan and so on always over a five years period. The time series would then be a representative value for each day.
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13319
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Creating an averaged time series over day and month per year
So you have a workfile with a page in it that contains daily (7 day?) observations between 2015 and 2019 (so 1826 observations)?
You wish to create a new series in the same page (so also 1826 observations) that contains the average over the years for the corresponding day/month combination?
If so,
You wish to create a new series in the same page (so also 1826 observations) that contains the average over the years for the corresponding day/month combination?
If so,
Code: Select all
series avgx = @meansby(x, @day, @month)
Follow us on Twitter @IHSEViews
-
- Posts: 5
- Joined: Mon Dec 21, 2020 9:47 am
Re: Creating an averaged time series over day and month per year
Perfect, thanks!
Who is online
Users browsing this forum: No registered users and 24 guests