Hi,
I've been doing day ahead and week ahead forecasting. Now I have to do more long term forecasting. Like 8 years ahead!!!
I have all the data i need, temperature etc, in a workfile. but it is hourly data. To do the long term forecast, i want to convert this all to montly data. Whats the best way of finding monthly averages of this temperature series say? Should i create a new workfile, or create a New Page on my existing workfile and apply a montly structure to it?
I have a series called DateTime. It contains the time and date (yyyy-mm-dd hh-mm). How do i write a program that would use the DateTime and the hourly Temperature series to create a new montly temperature series?
Your help is much appreciated
Minson
converting hourly data to monthly data
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13600
- Joined: Tue Sep 16, 2008 5:38 pm
Re: converting hourly data to monthly data
The problem you have, as I'm sure you're aware, is that EViews doesn't natively support hourly data.
One way I can think of doing this would be to create a new series containing just the month/year (not sure how your current date series is formatted, but I'm sure you can think of a way of extracting the month/year from it into a new series). Then once you have that month/year series, you can use the @meansby function to create the monthly averages. Something like:
series monthtemp = @meansby(temp, monthyear)
where temp is your temperature series, and monthyear is the series containing the month/year info.
One way I can think of doing this would be to create a new series containing just the month/year (not sure how your current date series is formatted, but I'm sure you can think of a way of extracting the month/year from it into a new series). Then once you have that month/year series, you can use the @meansby function to create the monthly averages. Something like:
series monthtemp = @meansby(temp, monthyear)
where temp is your temperature series, and monthyear is the series containing the month/year info.
Re: converting hourly data to monthly data
Hi Gareth,
I have a series, DateTIme which has the format yyyy-mm-dd hh:mm. I am able to extract the month and year using the @datepart(DateTime, "MM") and @datepart(DateTime, "YYYY") functions. But Eviews just recognises these as integers? How can i create a "MonthYear" series using these numbers which can then be used in the @meansby function?
I have a series, DateTIme which has the format yyyy-mm-dd hh:mm. I am able to extract the month and year using the @datepart(DateTime, "MM") and @datepart(DateTime, "YYYY") functions. But Eviews just recognises these as integers? How can i create a "MonthYear" series using these numbers which can then be used in the @meansby function?
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13600
- Joined: Tue Sep 16, 2008 5:38 pm
Re: converting hourly data to monthly data
If you have months in a series (just running 1-12) and years in another series (running, say, 1990-2012), then you could just do:
series monthtemp = @meansby(temp,month,year)
i.e. you don't really need to combine them into one series, you can just pass both into the meansby function.
series monthtemp = @meansby(temp,month,year)
i.e. you don't really need to combine them into one series, you can just pass both into the meansby function.
Re: converting hourly data to monthly data
thanks, that function works really well.
Regards
Minson
Regards
Minson
Who is online
Users browsing this forum: No registered users and 2 guests
