Importing data from excel, large amount of NA

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

martingale
Posts: 51
Joined: Tue Jul 24, 2012 11:36 am

Re: Importing data from excel, large amount of NA

Postby martingale » Mon Aug 06, 2012 1:52 pm

I tried first with a single excel file. Because I got an error message i tried to split the excel file. But the error message was the same both ways I tried.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13586
Joined: Tue Sep 16, 2008 5:38 pm

Re: Importing data from excel, large amount of NA

Postby EViews Gareth » Mon Aug 06, 2012 2:04 pm

I'm afraid without giving us more information, there is little we can do to help.

martingale
Posts: 51
Joined: Tue Jul 24, 2012 11:36 am

Re: Importing data from excel, large amount of NA

Postby martingale » Mon Aug 06, 2012 2:09 pm

I see, I hope somebody else can

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: Importing data from excel, large amount of NA

Postby EViews Glenn » Mon Aug 06, 2012 2:23 pm

Do you still have the single excel file? Why don't you post that one and then describe what happens when you try to import.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13586
Joined: Tue Sep 16, 2008 5:38 pm

Re: Importing data from excel, large amount of NA

Postby EViews Gareth » Mon Aug 06, 2012 2:30 pm

I see, I hope somebody else can
Or, you could provide exact details on what it is you are trying to do, and why it isn't working.

martingale
Posts: 51
Joined: Tue Jul 24, 2012 11:36 am

Re: Importing data from excel, large amount of NA

Postby martingale » Tue Aug 07, 2012 1:25 am

Glenn, what I tried with the single Excel file is pretty much the same except that steps (i) and (vi) are redundant:

ii) choose unstructured/undated date
iii) write in the first date which is 12/29/2006
iv) import from Excel file
v) get the message that 99 observations (i.e. all in the sample) will be discarded unless 99 observations are resized, choose OK

vii) choose Proc - Structure/Resize current page, then:
- work file structure type: Dated - specified by date series;
- date series: name of the object that contains the date series
viii) then I get the message "illegal panel structure dateid is nested within the previous dimensions of the panel structure"

The files I posted have only the first 100 observations, the full data set has over 270000 observations.
Another problem is that the last column ("un.returns") is not read as numbers but as characters.

martingale
Posts: 51
Joined: Tue Jul 24, 2012 11:36 am

Re: Importing data from excel, large amount of NA

Postby martingale » Tue Aug 07, 2012 11:18 am

Glenn, I tried again and this time I got further. Numerical data was imported correctly from Excel to EViews but dates were still imported as characters. I tried to choose date format during import, but then the dates changed to "NA".

The process went as follows:
- choose import from Excel
- choose unstructured/undated date
- fill in the first date in the route "range of observations" which is 12/29/2006
- import from Excel file (the total number of observations is 271920)
- get the message that "271919 observations (i.e. all in the sample but the first one) will be discarded unless 271919 observations are resized". I choose OK
- choose "Proc - Structure/Resize current page"
- choose "Work file structure type: Dated - specified by date series"
- choose "Date series", then write the name of the object that contains the date series
- then I get the message "Indices do not uniquely identify observations, 270523 duplicate date(s) found. Create CELLID series to identify observations?": choose yes
- then I get the message "Adding CELLID as the inner index will create a 2 dimension unbalanced undated panel. Are you sure you want to continue?": choose yes
- then Eviews creates two extra series called "cellid" and "dateid"

Superficially it looks like I managed to import the data from Excel to Eviews, but I am concerned with the last message of a "2 dimension unbalanced undated panel". Does this message mean that there are errors in my data set?

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: Importing data from excel, large amount of NA

Postby EViews Glenn » Tue Aug 07, 2012 11:52 am

Your sample Excel file has a single date for all of the observations. Is this true for the full workbook?

If so, you can't use date as the identifier since it doesn't identify the observations. My guess is that the column labeled IDENTIFIER is your identifier. If this is the case, I think you want an "Undated with ID series" structured workfile with IDENTIFIER used as the identifier.

If not true, then you probably want to structure as a panel with DATE as the date and IDENTIFIER as the identifier. But that's a guess since I can't see the original file.

martingale
Posts: 51
Joined: Tue Jul 24, 2012 11:36 am

Re: Importing data from excel, large amount of NA

Postby martingale » Tue Aug 07, 2012 1:31 pm

Thanx for the input.

"270523 duplicate date(s) found" out of 271920

My guess is that EViews creates the series "cellid" and "dateid" to identify each observation. But why is not enough with one series?

Does the EView message "Adding CELLID as the inner index will create a 2 dimension unbalanced undated panel" relates to these two series?

The structure in "cellid" is:
2007-12-29 - 1....211 1......211
and so on

The structure in "dateid" is:
2006-12-29 - 1...211 2006-12-29
and so on
Last edited by martingale on Wed Aug 08, 2012 1:05 am, edited 3 times in total.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13586
Joined: Tue Sep 16, 2008 5:38 pm

Re: Importing data from excel, large amount of NA

Postby EViews Gareth » Tue Aug 07, 2012 1:40 pm

Again, what are you trying to do?

Are you trying to create a panel?

Are you trying to create a simple time-series workfile? If so, do you realise that you have the same date repeated many times, which means your date is an invalid observation identifier?

martingale
Posts: 51
Joined: Tue Jul 24, 2012 11:36 am

Re: Importing data from excel, large amount of NA

Postby martingale » Tue Aug 07, 2012 2:04 pm

yes i realize that but it is not my question, never mind

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: Importing data from excel, large amount of NA

Postby EViews Glenn » Tue Aug 07, 2012 2:23 pm

You write
"270523 duplicate date(s) found" out of 271920

My guess is that EViews create the series "cellid" and "dateid" to identife each observation. But why is not enough with one series?
The first sentence is the answer to your question. The date series is not enough to identify each observation because there are duplicate dates: 270523 out of 271920 to be exact. Identifiers can't have duplicates.

martingale
Posts: 51
Joined: Tue Jul 24, 2012 11:36 am

Re: Importing data from excel, large amount of NA

Postby martingale » Tue Aug 07, 2012 2:33 pm

right, but either "cellid" or "dateid" which are the series created på eviews, not the series imported from excel, identifies uniquely each observation, so why two series, that is both "cellid" and "dateid" are needed?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13586
Joined: Tue Sep 16, 2008 5:38 pm

Re: Importing data from excel, large amount of NA

Postby EViews Gareth » Tue Aug 07, 2012 2:51 pm

Because you're creating a panel. Panels have two identifiers.

martingale
Posts: 51
Joined: Tue Jul 24, 2012 11:36 am

Re: Importing data from excel, large amount of NA

Postby martingale » Tue Aug 07, 2012 3:35 pm

thanx!

what is the message on "unbalanced undated panel" about?
Last edited by martingale on Wed Aug 08, 2012 1:49 am, edited 1 time in total.


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 1 guest