Page 8 of 16

Re: How to enter data into a panel workfile.

Posted: Tue Oct 29, 2013 3:57 am
by Bas
Dear Gareth,

Given your expertise i hope you can help me with a problem i'm encountering.

I am new to Eviews and im trying to import a panel data set from excel to Eviews following your detailed steps. In excel I already stacked the data as a panel structure which Eviews should automatically recognize. The problem I have is with the irregular date intervals my observations. I am looking at some variables to explain the cost of index funds. I have 80 index funds which i track over the period of 2000 to 2012. The problem that i have is that for some index funds i have 12 years of data (the full 2000 to 2012) but some funds came into existence later (say 2006) and i only have data over 2006 - 2012. When I only use the funds with the full 12 years of data, eviews correctly recognizes it as a dated panel with the fund and date as identifiers. however, If I include all the funds Eviews doesn't recognize this automatically anymore and I do not fully understand how i can overcome this issue. I hope you can help me. Attached you will find the workfile that I'm using.

Thank you in advance for your time.

Regards,

Re: How to enter data into a panel workfile.

Posted: Tue Oct 29, 2013 8:08 am
by EViews Gareth
If I open that up in EViews 8, and accept the default settings (i.e. just hit "Finish"), EViews appears to recognise the panel structure just fine.

Re: How to enter data into a panel workfile.

Posted: Wed Nov 06, 2013 3:09 am
by tvonbrasch
Hi,

In your example on importing panel data from an excel file (byyear.xls), the country code were in all cells of the excel file. However, when downloading data from OECD, the countries appear only merged in one cell across all years. See the example byyear1.xls. how do i import this file without manually making changes to excel?

Sincerely
Thomas von Brasch

Re: How to enter data into a panel workfile.

Posted: Wed Nov 06, 2013 6:21 am
by tvonbrasch
I found a nice code for Excel that does the job, but it would be nice to also know how to do it in Eviews.

EXCEL: Unmerge cells and fill with duplicate data with VBA code

With the following VBA code, you can quickly unmerge the cells and fill down the values.
1. Hold down the ALT + F11 keys, and it opens the Microsoft Visual Basic for Applications window.
2. Click Insert > Module, and paste the following macro in the Module Window.
Option Explicit
Sub Test()
Dim r As Excel.Range
Dim r1 As Excel.Range
Dim myR As Excel.Range
For Each r In ActiveSheet.UsedRange
Debug.Print r.Address, r.Count
If r.MergeArea.Count > 1 Then
Set myR = r.MergeArea
r.UnMerge
For Each r1 In myR
r1.Value2 = myR.Value2
Next r1
End If
Next r
End Sub
3. Then press the F5 key to run this code, the merged cells have been unmerged and auto-filled down the original merged values.

Re: How to enter data into a panel workfile.

Posted: Wed Nov 06, 2013 9:00 am
by EViews Gareth
In that particular example, it is pretty easy to just bring it in using default settings, then modify the country series to fill in the blanks:

Code: Select all

country = @recode(country="", country(-1), country)

Re: How to enter data into a panel workfile.

Posted: Thu Nov 07, 2013 1:38 am
by tvonbrasch
Thanks!

Sincerely
Thomas von Brasch

Re: How to enter data into a panel workfile.

Posted: Fri Nov 22, 2013 2:48 pm
by yiulun
Dear group

How can i enter this data into a panel workfile??????

Re: How to enter data into a panel workfile.

Posted: Sat Nov 23, 2013 11:49 am
by EViews Gareth
That is not panel data.

Re: How to enter data into a panel workfile.

Posted: Fri Dec 06, 2013 6:36 am
by Heuschnupfen
Dear Eviews Community,

unfortunatel I have to ask for your help. I am working with bilateral Data (Country pairs and the change of indicators over time - e.g. GDP ). Everything works fine so far with the Tutorial of Eviews Gereth (thanks a lot so far!) but I have a problem with one workfile.

Strategy so far: Organizing data in excel to have it "ready-to-import" - attached at the end
Importing foreign data as workfile; restructering the individual workfile to a panel -> Copy the Observations to one Workfile.

Equation: Log(stocks) = c log(realgdp) log(realgdp_partner) log(distw);
I already used in Excel the same identifieres to make it easier.

Stocks = FDI Stocks between the countries
Distw = weighed distance between the countries, no change over time.

Problem: With the stocks: Proc->reshape->stack in new page -> Identifieres year?
After that: d series01
rename year stocks
rename var01 year
Then: Proc-> restructured -> Dated Panel with Cross Section Ids (geo partner) ; Date series: Year
After that I see that is should be a Panel (Range!) but eviews does not give me any Panel Options under the Quick->Estimation-> LS

That Procedures works with all the workfiles where there is no "Partner" Identifier. Did I mess up sth. with the Identification?
Thanks a lot in advance for any suggestions, I would appreciate any help!
Have a nice weekend.

Ps: Files Attached: Excel File and Workfile, basic and restructered

Re: How to enter data into a panel workfile.

Posted: Fri Dec 06, 2013 9:12 am
by EViews Gareth
You have a three dimensional panel. EViews doesn't offer specialised panel estimation options when dealing with three dimensional panels.

Re: How to enter data into a panel workfile.

Posted: Fri Dec 06, 2013 9:26 am
by Heuschnupfen
Thanks a lot for the fast reply!

Do I have any possibility to apply (time) fixed Effects? Or do I have to change the excel files (merging geo and partner)?
Do you recommend a special procedure?

Re: How to enter data into a panel workfile.

Posted: Fri Dec 06, 2013 9:30 am
by EViews Gareth
If you just want fixed effects, you can create the dummy variables manually.

Re: How to enter data into a panel workfile.

Posted: Fri Dec 06, 2013 2:04 pm
by Heuschnupfen
Well, then I will have to do that.

Thanks a lot, Chef!

Last question, but I think that can figure that out by myself.
Easiest way will be with the @expand command, is that correct?

In my case @expand(geo, @drop(AT)) @expand(year, @drop(1997)) for fixed (Time) Effect, isn't it?
Anyways, appreciate your advise, you helped my already a lot.
Cheers.

Second Edit: Little Research helped, here to help others who are searching the same prob:

http://forums.eviews.com/viewtopic.php?t=3840&f=4

Re: How to enter data into a panel workfile.

Posted: Fri Feb 28, 2014 10:39 am
by Cciobu89
Hi,

I am currently trying arrange a panel data, but all the time I am trying to unstack my data I receive this message from Eviews: ID doesn't uniquely identify workfile observations.

I use variables as unstacking identifiers and observation identifiers: country and var01



Could you please advise why this is happening?

Re: How to enter data into a panel workfile.

Posted: Fri Feb 28, 2014 11:02 am
by EViews Gareth
That Excel file appears to be empty.