Hey guys
I have a dataset (in Excel) consisting of quarterly observations. For each of these Observations, I also have an exact date and time, like: Obs.value, 20000101, 07:00.
Also I created an eViews Workfile with 10 Minute frequency. Now I want to import that quarterly data to the eViews workfile. For all (10min frequency) observations where there is no corresponding value in the data, the observation value should be zero. That means in the end I need to have a 10 Min frequency vector with one observation value per quarter and zeros otherwise:
. . . .
20000101, 06:50, 0
20000101, 07:00, Obs. Value (one per quarter)
20000101, 07:10, 0
. . .
Does anyone know how to programm that in eViews?
thanks a lot!
save quarterly data in workfile with 10min frequency
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
-
EViews Chris
- EViews Developer
- Posts: 161
- Joined: Wed Sep 17, 2008 10:39 am
Re: save quarterly data in workfile with 10min frequency
It's not entirely clear from your post what you've already tried.
If your Excel file has date/time data and you import it into a 10 minute workfile, EViews should fill in the observations that have matching date/time values and leave the rest of the observations as missing values (NAs). If you're not seeing this, then you may need to help EViews understand how the timestamp in your Excel file is coded.
You would then need to swap out the missing values with zeros in a second step. For example:
x = @recode(x<>na, x, 0)
will replace all the NA values in the series x with zeros.
If your Excel file has date/time data and you import it into a 10 minute workfile, EViews should fill in the observations that have matching date/time values and leave the rest of the observations as missing values (NAs). If you're not seeing this, then you may need to help EViews understand how the timestamp in your Excel file is coded.
You would then need to swap out the missing values with zeros in a second step. For example:
x = @recode(x<>na, x, 0)
will replace all the NA values in the series x with zeros.
Re: save quarterly data in workfile with 10min frequency
Thanks a lot for your reply!
The problem I now have is that in the Excel file, the dates are stored in two separate rows (date=one row, time=one row):
Obs.value, YYYYMMDD, HH.MM, for example
20, 20001201, 7.30
All values are stored as numbers, not in the date format.
Is there any way I can tell eviews how to correctly read this data?
(ie to put the value 20 to the obs on dec first 2000, 07.30 am)
Or do i have to transfer the time data into a date format as 01.12.2000 07:30 and then load the data in eViews?
Thanks a lot!
The problem I now have is that in the Excel file, the dates are stored in two separate rows (date=one row, time=one row):
Obs.value, YYYYMMDD, HH.MM, for example
20, 20001201, 7.30
All values are stored as numbers, not in the date format.
Is there any way I can tell eviews how to correctly read this data?
(ie to put the value 20 to the obs on dec first 2000, 07.30 am)
Or do i have to transfer the time data into a date format as 01.12.2000 07:30 and then load the data in eViews?
Thanks a lot!
Re: save quarterly data in workfile with 10min frequency
... now I even tried with the "correct" date format (I transformed the number-values in Excel to Date-Time Values) but it didnt work.
Eviews just stores the values in the first observation periods.
I attached an example with just two observations.
Here's the code I use to load the data:
'setting working directory
'************************************
%path="U:\test\"
%path=@runpath
cd %path
'read in data
'************************************
wfcreate (wf=wfex) 10mi 2003 2004
%temppath = %path + "example2.xls"
read(a1) %temppath 2
smpl @all
wfsave "wfex.wf1"
'wfclose
'exit
Does anyone know how to solve that?
Thanks!!
Eviews just stores the values in the first observation periods.
I attached an example with just two observations.
Here's the code I use to load the data:
'setting working directory
'************************************
%path="U:\test\"
%path=@runpath
cd %path
'read in data
'************************************
wfcreate (wf=wfex) 10mi 2003 2004
%temppath = %path + "example2.xls"
read(a1) %temppath 2
smpl @all
wfsave "wfex.wf1"
'wfclose
'exit
Does anyone know how to solve that?
Thanks!!
- Attachments
-
- example2.xls
- (28 KiB) Downloaded 652 times
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: save quarterly data in workfile with 10min frequency
Don't use READ. Use WFOPEN or IMPORT.
Re: save quarterly data in workfile with 10min frequency
Did it work for you with the IMPORT command?
Could you provide your code then?
Thank you!!
Could you provide your code then?
Thank you!!
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: save quarterly data in workfile with 10min frequency
An example file with only two observations isn't much use.
Re: save quarterly data in workfile with 10min frequency
okay heres some more observations.
many thanks
many thanks
- Attachments
-
- sample.xlsx
- (9.56 KiB) Downloaded 670 times
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: save quarterly data in workfile with 10min frequency
Code: Select all
wfcreate 10mi 2005 2013
import sample.xlsx
Re: save quarterly data in workfile with 10min frequency
ah I finally found why it didnt work...
there were some issues in my original data.
thanks a lot for helping me out!
there were some issues in my original data.
thanks a lot for helping me out!
Who is online
Users browsing this forum: No registered users and 2 guests
