How to enter data into a panel workfile.

For requesting general information about EViews, sharing your own tips and tricks, and information on EViews training or guides.

Moderators: EViews Gareth, EViews Moderator

belem12
Posts: 1
Joined: Wed Mar 18, 2015 4:57 pm

Re: How to enter data into a panel workfile.

Postby belem12 » Wed Mar 18, 2015 5:08 pm

EViews Gareth wrote:There are a number of different ways to enter data into a panel workfile. Which method works best really depends upon how your data starts out.

In this post I'm going to describe a method which converts data that is currently in "pool" form into a panel. For posts on entering data into a panel from Excel files, scroll down a bit! The workfile I'm using can be found at:

http://www.eviews.com/Forum_support/poo ... poolg7.wf1

The workfile looks like this:
Image

As you can see there are 7 cross-sections, CAN, FRA, GER, ITA, JPN, UK, USA, with 43 years of data (1950 to 1992) and two data series, GDP and Unemp.

Moving this data into a panel workfile is relatively simple. Via the menus you can do this:

Click on Proc->Reshape Current Page->Stack in New Page
Image

Enter the stacking identifiers.
You have a number of choices for this. The easiest, in this case, is to enter a series pattern. In our case our series (gdp and unemp) have a pattern of series_crossid. Thus I can use one of my series as a pattern. In this case I used unemp? The "?" represents the cross-section identifier (in this case _US or _CAN).
Image

Hit ok, and you're done!
Image

Note how you now have a panel workfile (you can tell from the Range statement at the top of the workfile - the fact it has a x7 at the end lets us know it is a panel).


Note if you wanted to do this via the command line, you just need to do this:

Code: Select all

pagestack unemp?


Simple!


Greetings Gareth,

Thanks for your post. Very useful indeed.

Once doing this, how does one type in the equations in a system for a Seemingly Unrelated Regression model?

Would it be something similar to the following?...

gdp_can=c(1)+c(2)*unemp_can
gdp_fra=c(3)+c(4)*unemp_fra
gdp_ita=c(5)+c(6)*unemp_ita
gdp_ger=c(7)+c(8)*unemp_ger
gdp_us=c(9)+c(10)*unemp_us
gdp_uk=c(11)+c(12)*unemp_uk
gdp_jpn=c(13)+c(14)*unemp_jpn

Hope I can get some help here :)
Cheers

agaro123
Posts: 10
Joined: Mon Feb 09, 2015 10:10 am

Re: How to enter data into a panel workfile.

Postby agaro123 » Thu May 07, 2015 2:12 am

For some reason, I can't open this as a panel, only as unstructured/undated. What am I doing wrong? Please see the attached file.

After i do the whole Hit Proc->Structure/Resize Current Page
Change the Workfile structure to "Dated Panel"
Enter Country as Cross section ID
Enter Year as Date series

It turns it into a 3d panel.
But then when I try to run a regression I can't choose whether to have fixed effects, so the "panel options" tab does not show up when estimating an equation.

Thanks!!
:D
Attachments
Thesis Output WIP233.xlsx
(443.27 KiB) Downloaded 624 times

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

Re: How to enter data into a panel workfile.

Postby EViews Gareth » Thu May 07, 2015 7:59 am

EViews doesn't support panel estimation features for 3D panels. Only for 2D panels. 99% of panel econometric theory only deals with 2D panels.
Follow us on Twitter @IHSEViews

JanVinter
Posts: 10
Joined: Thu Apr 30, 2015 9:49 am

Re: How to enter data into a panel workfile.

Postby JanVinter » Wed May 13, 2015 12:28 pm

Hi

I have a very large dataset that I want to use as a panel dataset. However, I just cannot wrap my head around what modifications I need to make in order to get it to work as such within Eviews. I have monthly a unique account number, along with a customer number and a zipcode. For each unique account number, there is a monthly revenue figure. I am posting a small sample of that data here:

DataFileTest1.xlsx
(10.54 KiB) Downloaded 617 times


Thanks for the help :)

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

Re: How to enter data into a panel workfile.

Postby EViews Gareth » Wed May 13, 2015 1:09 pm

How is it panel data? What are the cross-sections?
Follow us on Twitter @IHSEViews

JanVinter
Posts: 10
Joined: Thu Apr 30, 2015 9:49 am

Re: How to enter data into a panel workfile.

Postby JanVinter » Wed May 13, 2015 1:27 pm

Sorry, upon further inspection, I suppose it is not panel data. Account Key, Customer Key and Zip Code should, naturally, be constant across time. I just can't find a way to get the data in a format that enables me to carry out time series operations.

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

Re: How to enter data into a panel workfile.

Postby EViews Gareth » Wed May 13, 2015 1:30 pm

Figure out what your data are first, then we can help you figure out how to get it into EViews :D
Follow us on Twitter @IHSEViews

agaro123
Posts: 10
Joined: Mon Feb 09, 2015 10:10 am

Re: How to enter data into a panel workfile.

Postby agaro123 » Wed May 20, 2015 11:27 pm

EViews Gareth wrote:EViews doesn't support panel estimation features for 3D panels. Only for 2D panels. 99% of panel econometric theory only deals with 2D panels.


Is there a way I could turn this into a 2d panel without losing significance?
If I use the attached file, what is the Eviews command to create unique cross section ids? I guess my problem is that I have observations for the given countries for the same years from different partners. How should I proceed if I simply don't include the partners in the analysis, but I still want to keep the same observations?

Thanks!
Attachments
Output3.xlsx
(409.98 KiB) Downloaded 625 times

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

Re: How to enter data into a panel workfile.

Postby EViews Gareth » Thu May 21, 2015 8:02 am

That question is not an EViews questions, so you'll have to ask it in the Econnometrics section, and hope a non-EViews team member will help you :D
Follow us on Twitter @IHSEViews

Redwing153
Posts: 30
Joined: Sat May 30, 2015 5:10 am

Re: How to enter data into a panel workfile.

Postby Redwing153 » Sun Jul 05, 2015 7:42 am

SO I have created a panel using the first method described by Gareth at the top of this thread. I have imported 14 time series (using the excel wizard), created a pool and using that pool created a new page with my panel data in it.
I want to update this panel data as new time series data becomes available (i.e. updated for the passage of time) and I am really struggling to achieve this.

My first problem is that when new data becomes available my page (containing the original series data and my pool object) does not expand (i.e. the date range does not increase) to incorporate the new excel data. I am currently working around this by 1) expanding the workpage manually and 2) Object>Manage Links and Formulae>Properties and then changing the cell range manually.

My second problem is that once I have expanded my work page and updated my time series, I am finding it impossible to update my panel page to reflect the new data. In fact the only way I have been able to achieve this is to delete the page and start again.

Ultimately I want to be able to use the add-in in excel to extract my panel data so I can chart it in excel.

Is there a quicker way around problem one?
How do I link my panel data to the original time series data such that it an be updated when my time series update?

thanks..

R

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

Re: How to enter data into a panel workfile.

Postby EViews Gareth » Sun Jul 05, 2015 11:14 am

Creating a panel from Excel data via the pool method is roundabout. Just go straight from Excel into a panel in EViews. Then you can have links updating etc...
Follow us on Twitter @IHSEViews

Redwing153
Posts: 30
Joined: Sat May 30, 2015 5:10 am

Re: How to enter data into a panel workfile.

Postby Redwing153 » Sun Jul 05, 2015 12:10 pm

Thanks Gareth (especially given it is a Sunday).
However I'm not sure that works for me as the primary method of getting data into eviews for me will be via Bloomberg and Datastream databases; Pretty sure I can't download straight from them in a manner suitable for panel data.
What would you suggest?

thanks again

R.


edit - sorry I didn't make myself clear - I'm importing from excel because I'm at home and don't have access to Dstream and Bloomberg right now - I'm essentially testing how I go about doing the above. I didn't realise there would be any real difference.

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

Re: How to enter data into a panel workfile.

Postby EViews Gareth » Sun Jul 05, 2015 1:22 pm

Then you're pretty much out of luck. Neither Datastream or Bloomberg provide stacked panel data, so, yeah, you'll have to go via a pool interface, but then you can't have auto-updating. Best thing to do is write a program that does all the import/manipulation for you, then re-run the program whenever you want to update.
Follow us on Twitter @IHSEViews

Redwing153
Posts: 30
Joined: Sat May 30, 2015 5:10 am

Re: How to enter data into a panel workfile.

Postby Redwing153 » Sun Jul 05, 2015 1:24 pm

ok, thanks - at least I know how to progress!
As an aside - when I create a panel structure using Proc/Reshape current page - there is only the option to stack in a new page - I cant overwrite a previous stack - is that correct? Presumably a program might do that for me?

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

Re: How to enter data into a panel workfile.

Postby EViews Gareth » Sun Jul 05, 2015 5:24 pm

In a program you could delete the existing page (pagedelete) then restack it.
Follow us on Twitter @IHSEViews


Return to “General Information and Tips and Tricks”

Who is online

Users browsing this forum: No registered users and 16 guests