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

Liakos027
Posts: 3
Joined: Tue Jul 14, 2015 5:22 am

Re: How to enter data into a panel workfile.

Postby Liakos027 » Tue Jul 14, 2015 5:26 am

I have tried to enter the following ecxel file into Eviews but I had no success. Can you help me?
Attachments
ULC Total 2.xlsx
(18.49 KiB) Downloaded 194 times

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

Re: How to enter data into a panel workfile.

Postby EViews Gareth » Tue Jul 14, 2015 4:28 pm

On my phone only, so give gui instructions, but I think the following program will do it:

Code: Select all

wfopen "ulc total 2.xlsx" colhead=2
pagestack num?
rename num ulc
rename var01 year
pagestruct country @date(year)
Follow us on Twitter @IHSEViews

adnma
Posts: 12
Joined: Wed Sep 02, 2015 2:43 am

Re: How to enter data into a panel workfile.

Postby adnma » Tue Oct 13, 2015 2:56 pm

Hi!

I have panel data set with 65 firms spread over 5 years (2009-2013)

The issue that I am facing is that I have to test for heteroscedasticity. As no direct test for het. is available I have to convert the panel structured/dated to unstructured so I will be able to run White test.

How do I undertake such conversion in Eviews 8.

Please Help!

Workfile Posted.
Attachments
fds1d.wf1
EVIEWSWorkfile
(55.94 KiB) Downloaded 155 times

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

Re: How to enter data into a panel workfile.

Postby EViews Gareth » Tue Oct 13, 2015 5:33 pm

Just double-click the Range word at the top of the workfile and change the structure to unstructured.
Follow us on Twitter @IHSEViews

BK03
Posts: 13
Joined: Tue Nov 10, 2015 5:35 am

Re: How to enter data into a panel workfile.

Postby BK03 » Tue Nov 10, 2015 5:45 am

Hi Gareth,

In the example you give below is it possible then to isolate a variable, say history of house prices in Alabama? If you open up the object house prices, the house prices appear for all the states. What if I just wanted to regress house prices in Alabama against the school budget in Alabama? Do I have to go about creating a new variable? If so, how do I do this?

Thanks!


EViews Gareth wrote:A second type of format that is used in Excel, is where the columns represent dates, then the rows represent both cross-sections and variables. Such is the case in the following:
Image

This file can be obtain from here.

This sort of structure is a little more tricky, and takes a bit more effort inside EViews. If you bring the file in by opening it into EViews, you will get a workfile that looks like this:
Image

The first thing we need to do is to stack this into a new page:
Image
Image
Notice that we use yr? as the stacking identifier since the series in EViews are all named yrXXXX.

The stack results in the following workfile page:
Image

Now we need to unstack this page into a panel. First, though, we need to change our "Variable" series a little. This is because the text inside that variable contains spaces, and we want to create new series from this text, but series names cannot contain spaces. Thus we type the following in the command pane to create a new alpha series containing valid names:

Code: Select all

alpha var2=@replace(variable," ","_")
show var2
d variable


Image

Once this new alpha series has been created, we can do the unstack:

Image
Image
Image

Now we're pretty much done. We just need to type a few more commands to tidy things up a bit (delete some un-needed series and rename some):

Code: Select all

d yr
rename yr* *

Image

And we're done!

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

Re: How to enter data into a panel workfile.

Postby EViews Gareth » Tue Nov 10, 2015 9:15 am

BK03 wrote:Hi Gareth,

In the example you give below is it possible then to isolate a variable, say history of house prices in Alabama? If you open up the object house prices, the house prices appear for all the states. What if I just wanted to regress house prices in Alabama against the school budget in Alabama? Do I have to go about creating a new variable? If so, how do I do this?

Thanks!



Just set the sample to be only observations in Alabama.

Code: Select all

smpl if state = "Alabama"
Follow us on Twitter @IHSEViews

Olvit
Posts: 3
Joined: Tue Nov 10, 2015 12:02 pm

Re: How to enter data into a panel workfile.

Postby Olvit » Tue Nov 10, 2015 12:11 pm

Dear Gareth
sorry for distrubing you, I have started to look through your answers on panel data but was not able to find exmaple which fit my case.
So, i have following excel sample Imagehttp://prntscr.com/91a6lx
and I need to create a panel workfile for 12 pilars as a variables.
Data range is 2007-2015, number of countries 151, number of pillars -12

How should I make it easily?
Thank you for the help in advance
Attachments
GCR_pillars.xlsx
here is exscel file
(219.3 KiB) Downloaded 156 times
Last edited by Olvit on Tue Nov 10, 2015 12:25 pm, edited 1 time in total.

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

Re: How to enter data into a panel workfile.

Postby EViews Gareth » Tue Nov 10, 2015 12:24 pm

Can you provide the Excel file?
Follow us on Twitter @IHSEViews

Olvit
Posts: 3
Joined: Tue Nov 10, 2015 12:02 pm

Re: How to enter data into a panel workfile.

Postby Olvit » Tue Nov 10, 2015 12:27 pm

EViews Gareth wrote:Can you provide the Excel file?

Yes, I have edited my post and add there excel file

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

Re: How to enter data into a panel workfile.

Postby EViews Gareth » Tue Nov 10, 2015 12:43 pm

Easiest with a brief program:

Code: Select all

wfopen gcr_pillars.xlsx
pillars = "pill_" + pillars
pageunstack pillars  date
pagestack ?pill_1st @ ?* *
pagestruct var01 @date(date)
Follow us on Twitter @IHSEViews

Olvit
Posts: 3
Joined: Tue Nov 10, 2015 12:02 pm

Re: How to enter data into a panel workfile.

Postby Olvit » Tue Nov 10, 2015 1:10 pm

Thank you! it works!!!!!

totomkos
Posts: 9
Joined: Sun Mar 13, 2016 8:29 am

Re: How to enter data into a panel workfile.

Postby totomkos » Mon Mar 14, 2016 4:47 am

Dear All,

As I new in eviews I would really need your help. I have dividend data for several companies for several years and many idependent variables some of which are dummies. I want to import the to eviews from excel.

Some specifiactions: I have observations from 8 years and about 500 companies that have more than one observation-dividend for each each year. This means that i havenot the same observations between companies and years. addtionally, some of my explantory variables are dummies related to nationality gender etc.
I follow your threads but I fail... additionally i try to attach you a excel file or wfi (the extension is not allowed) but I cannot, I do not know why?
Is it possilbe to guide me?

Thank a lot

totomkos
Attachments
testpanel.xls
a part of my data
(31.5 KiB) Downloaded 130 times

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

Re: How to enter data into a panel workfile.

Postby EViews Gareth » Mon Mar 14, 2016 8:46 am

Which column is the time dimension and which column is the cross-section dimension?
Follow us on Twitter @IHSEViews

alper
Posts: 2
Joined: Tue May 17, 2016 4:07 am

Re: How to enter data into a panel workfile.

Postby alper » Tue May 17, 2016 4:43 am

Hello Gareth

I tried to form a balanced panel file for quarterly period 2011-2015 (years column) and 20 cross sections İD (firm Column) with VALUE (dependent variable, log value of firms' Daily price change), VALUATION (explanatory variable, log value of firms assets valuation difference), CURRENCY (explanatory -control- variable , log value of FX difference), CAP (explanatory-control- variable, log value of firms Capitalization).

However when I tried to create a new wf by openning a foreign file and picked "dated panel" I had an error message: "repeated values found in source ID series". I then created an unstructred and unbalanced file. Secondly, I picked "Proc/"structured/resize.." to transform existing file into dated panel. I received those following message:

"indicies do not uniquely identity observation. 20 dublicate date(s) found. create ID series to identify observation" I answered yes.
Then "Adding cellid as inner index will create a 3 dimension unbalanced undated panel. Are you sure you wish to continue?" I answered yes again to get the final wf.

My original excel file and eviews excel file are attached. What could be the problem to construct a balanced panel

Thank you in advance
Attachments
balancedpanel.wf1
(34.21 KiB) Downloaded 105 times
BALANCEDPANEL.xlsx
(41.5 KiB) Downloaded 105 times

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

Re: How to enter data into a panel workfile.

Postby EViews Gareth » Tue May 17, 2016 6:47 am

Check the dates carefully in the source Excel file.
Follow us on Twitter @IHSEViews


Return to “General Information and Tips and Tricks”

Who is online

Users browsing this forum: No registered users and 3 guests