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).
How to deal with daylight-saving time in hourly data
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
-
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
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.
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.
Who is online
Users browsing this forum: No registered users and 1 guest
