Import panel data

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator

stefanp
Posts: 63
Joined: Wed Sep 30, 2015 12:24 am

Import panel data

Postby stefanp » Fri Mar 23, 2018 8:41 am

Hi all,
I have a rather large panel data set in Excel. Due to the size of the set and the limitations of the number of rows in Excel, the file structure is not ideal for Eviews.

The cross-sections I use are region-industry pairs. Let me try to describe the structure:

Date region Industry Y Industry Z
2000M01 A 234 345
2010M12 A 285 265
2000M01 B 238 185

Hence, it is somewhat similar to the 1st example described here:
http://forums.eviews.com/viewtopic.php?t=74

Instead of different variables, I have different cross-sections in the columns. When I follow the procedure mentioned above, the cross-sections appear as different variables in the date set.

What I need in Eviews is basically a structure like this:
Date region Industry Value
2000M01 A Y 234
2010M12 A Y 285
2000M01 A Z 345
2010M12 A Z 265
2000M01 B Y 238

I hope I could make myself clear. What is the optimal way to transform the data set?

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

Re: Import panel data

Postby EViews Gareth » Fri Mar 23, 2018 8:46 am

Could you provide an example file?
Follow us on Twitter @IHSEViews

stefanp
Posts: 63
Joined: Wed Sep 30, 2015 12:24 am

Re: Import panel data

Postby stefanp » Fri Mar 23, 2018 9:14 am

Sure, please see the attachement. The first table is what I have, the second what I want to have.
Attachments
example.xlsx
(9.35 KiB) Downloaded 328 times

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

Re: Import panel data

Postby EViews Gareth » Fri Mar 23, 2018 9:26 am

I expanded your example to a working example. The following code should give you what you want.

Code: Select all

wfopen example.xlsx
pagestack industry_? @ *? *
rename industry_ variable
rename var01 industry
pagestruct region industry @date(dateid)
Attachments
example.xlsx
(15.53 KiB) Downloaded 293 times
Follow us on Twitter @IHSEViews

stefanp
Posts: 63
Joined: Wed Sep 30, 2015 12:24 am

Re: Import panel data

Postby stefanp » Wed Apr 04, 2018 5:58 am

Great, thanks!


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 13 guests