I'm having trouble creating a panel workfile in EViews6. I have looked in the EViews guide and on this forum (pool/panel) but I still cannot do it. My Excel data is imported from Orbis database and does not look like any examples I can find on the internet. I have attached an example but the real Excel workbook contains a large number of variables (in one sheet) and can therefore not (easily) be manipulated i Excel. I think the problem is that I cannot stack the data properly in EViews.
Furthermore I'm not sure whether to create the dummy variables in Excel or in EViews.
Thanks!
Create panel workfile with data from Excel (Orbis data)
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
Create panel workfile with data from Excel (Orbis data)
- Attachments
-
- Example_panel.xlsx
- (14.49 KiB) Downloaded 419 times
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13603
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Create panel workfile with data from Excel (Orbis data)
It is hard to tell from that spreadsheet what the dimensions of your panel are. You seem to have 3 identifiers - Company, Country, and then Year. But company doesn't appear to be a panel identifier.
Re: Create panel workfile with data from Excel (Orbis data)
@Eviews Gareth: I need to do a panel regression where the observations varies across company and year. I therefore believe that each observation can be identified by "year" AND "company". I want to stack the data so that each company is listed one time each year and so that each variable is only listed once. (currently I have each company listed once and all variables listed each year). "country" is to be included like all other variables (just as a dymmy for n-1 countries). I have once more tried to show it in Excel. Please see file attached. Thanks!
- Attachments
-
- Example_panel_v2.xlsx
- (17.35 KiB) Downloaded 371 times
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13603
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Create panel workfile with data from Excel (Orbis data)
Using your initial Excel file, if you open it in EViews, you'll get a workfile with 25 observations, and a bunch of series, such as ebit_2008, ebit_2009, roa_2010 etc...
From that workfile you can click on Proc->Reshape Current Page->Stack in New page. In the first box enter "ebit?", then hit OK.
You'll get a new page that will have the ebit and roa values stacked. All you need to do now is structure it as a panel. First of all you need to create a date series. To do this, type:
In the command window. This creates a numerical variable, called year, from the alpha variable, var01, that was created during the page stack. Note that var01 contains _2008, _2009 etc..., so cannot be used as a date series itself (since EViews won't recognise the _ part).
Once you've done that, you can click on Proc-Sturcture/Resize Current Page, then change the structure type to "Dated Panel", and enter "company" as the cross-section ID, and "year" as the date id. Then you're done.
From that workfile you can click on Proc->Reshape Current Page->Stack in New page. In the first box enter "ebit?", then hit OK.
You'll get a new page that will have the ebit and roa values stacked. All you need to do now is structure it as a panel. First of all you need to create a date series. To do this, type:
Code: Select all
series year = @val(@mid(var01, 2))
Once you've done that, you can click on Proc-Sturcture/Resize Current Page, then change the structure type to "Dated Panel", and enter "company" as the cross-section ID, and "year" as the date id. Then you're done.
Who is online
Users browsing this forum: No registered users and 2 guests
