Page 1 of 1

Import panel data

Posted: Fri Mar 23, 2018 8:41 am
by stefanp
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?

Re: Import panel data

Posted: Fri Mar 23, 2018 8:46 am
by EViews Gareth
Could you provide an example file?

Re: Import panel data

Posted: Fri Mar 23, 2018 9:14 am
by stefanp
Sure, please see the attachement. The first table is what I have, the second what I want to have.

Re: Import panel data

Posted: Fri Mar 23, 2018 9:26 am
by EViews Gareth
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)

Re: Import panel data

Posted: Wed Apr 04, 2018 5:58 am
by stefanp
Great, thanks!