pageunstack
Posted: Thu Jun 04, 2009 11:40 am
Hi,
I'd like to construct an unstacked panel data set from stacked data in an excel file.
I'm using EViews 5.1.
I attached the excel file that I have.
It contains 3 letter country code (ccode), data year (year), and a variable of interest (kaopen).
I'd like to read it as the format like this: (ccode)_KAOPEN.
For example,
USA_KAOPEN
CAN_KAOPEN
JPN_KAOPEN
... and so forth, and each series contains the time series of KAOPEN of each country.
I thought that "pageunstack" will work.
So, here is my program code, which does not work well.
By the way, I prefer to use program codes as I will hand it in to my supervisor.
I will really appreciate it if anyone could give me any suggestion.
Thank you very much,
Futoshi
I'd like to construct an unstacked panel data set from stacked data in an excel file.
I'm using EViews 5.1.
I attached the excel file that I have.
It contains 3 letter country code (ccode), data year (year), and a variable of interest (kaopen).
I'd like to read it as the format like this: (ccode)_KAOPEN.
For example,
USA_KAOPEN
CAN_KAOPEN
JPN_KAOPEN
... and so forth, and each series contains the time series of KAOPEN of each country.
I thought that "pageunstack" will work.
So, here is my program code, which does not work well.
Code: Select all
pagecreate(page=Capital_Mobility) u 6916
%path = %currentdirectory + "KAOPEN_CI2007.xls"
read(A2,na="",t=xls) %path cn year kaopen ccode $ country_name $
pageunstack(namepat="?_*") ccode year @ kaopenI will really appreciate it if anyone could give me any suggestion.
Thank you very much,
Futoshi