How to deal with daylight-saving time in hourly data

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

statcon
Posts: 4
Joined: Mon Jul 04, 2011 12:33 am

How to deal with daylight-saving time in hourly data

Postby statcon » Wed Oct 09, 2013 11:16 am

Hi,

I'm just facing the problem of having hourly data over a couple of years in an excel file. As we are in germany there is the problem that one day in october has 25 hours.

In our excel file this is represented by the fact, that there are two observations e.g. on October 27th 2012 23:00.

Is there any way to import that data structure in Eviews? The current solution is to remove one of the observations each year, because Eviews complains about duplicated values in the id-series (what is understandable of course).

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

Re: How to deal with daylight-saving time in hourly data

Postby EViews Chris » Wed Oct 09, 2013 12:04 pm

EViews isn't going to let you bring in the file with duplicate date identifiers, so the best you could do is to first bring it in as an unstructured file, drop the duplicate rows, and then structure the file.

To drop the duplicate rows, you can use Proc...Contract Current Page (or the pagecontract command) with an 'if' condition to drop the rows you don't want eg.

pagecontract if dateid <> dateid(-1)

if you want to keep the first value or

pagecontract if dateid <> dateid(+1)

if you want to keep the second value.

After you've dropped the duplicates, you can structure the page with Proc...Structure/Resize page or the pagestruct command.

Of course, you're going to end up with a 'hole' in the hours at the other end when the clocks were put forward. (EViews will just treat this as being an irregular frequency).

Another approach would be to label the observations with the non daylight saving adjusted times and create a 0/1 dummy to indicate the time shift (using if statements like those given above). You could keep the daylight savings adjusted time as a separate series in the workfile. The best approach probably depends a bit on what data you're actually working with.


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 0 guests