how can I do to structure a panel data in a worfile

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

Moderators: EViews Gareth, EViews Moderator

pablotillan
Posts: 6
Joined: Mon May 20, 2013 1:01 pm

how can I do to structure a panel data in a worfile

Postby pablotillan » Mon May 20, 2013 1:35 pm

Hi i have this excel file and this workfile after stacked. I followed the step to stack the data but when I want unstacked as you explain in the topic "how to enter panel data in a workfile" I can´t do it .Could you help me?
I want evaluate the evolution of PBI and IA over the years in the diferent countries. Specifically my problem is how I can structure this excel file in eviews like panel data
thanks
Attachments
excel.png
excel.png (266.61 KiB) Viewed 8214 times
evies.png
evies.png (153.51 KiB) Viewed 8214 times

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

Re: how can I do to structure a panel data in a worfile

Postby EViews Gareth » Mon May 20, 2013 1:36 pm

Post the actual data files, rather than pictures of them.
Follow us on Twitter @IHSEViews

pablotillan
Posts: 6
Joined: Mon May 20, 2013 1:01 pm

Re: how can I do to structure a panel data in a worfile

Postby pablotillan » Mon May 20, 2013 1:55 pm

here are the real files
Attachments
beforestacked.WF1
this is the workfile before stacked
(44.68 KiB) Downloaded 315 times
cuadro stacked.WF1
the workfile after stack . I use pr series like stacking identifiers
(131.23 KiB) Downloaded 310 times
cuadro IACE.xls
excel file
(89 KiB) Downloaded 327 times

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

Re: how can I do to structure a panel data in a worfile

Postby EViews Gareth » Mon May 20, 2013 2:12 pm

I'm going to assume that you want the dates to be the last part of the period (i.e. pr1990-92 will become simply 1992).

You appear to have some data problems with Saint Kitts, Saint Lucia and Saint Vincent. They have two IA variables, rather than an IA and a PBI.

Assuming you fix those, then the following code should do it for you:

Code: Select all

wfopen "cuadro iace.xls"

pagestack pr?

series year = @dateval(@right(var01,2), "YY")

pageunstack variable paises year

pagestruct @date(year) paises

delete pr
rename pr* *
Follow us on Twitter @IHSEViews

pablotillan
Posts: 6
Joined: Mon May 20, 2013 1:01 pm

Re: how can I do to structure a panel data in a worfile

Postby pablotillan » Mon May 20, 2013 2:27 pm

Thanks Gareth! The dates are an average between these years so if is posible i would like don´t change de name of the series.I have to do something different in order to not change the names of these series? . About Saint Kitts, Saint Lucia and Saint Vincent I made a mistake when I wrote but the data are one cell pbi and one cell ia.

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

Re: how can I do to structure a panel data in a worfile

Postby EViews Gareth » Mon May 20, 2013 2:38 pm

If you want to use any time/date functionality in EViews, you're going to have to keep them as a single year.
Follow us on Twitter @IHSEViews

pablotillan
Posts: 6
Joined: Mon May 20, 2013 1:01 pm

Re: how can I do to structure a panel data in a worfile

Postby pablotillan » Mon May 20, 2013 2:47 pm

ok no problem! really thanks

PhilipvG
Posts: 2
Joined: Tue May 28, 2013 4:54 am

Re: how can I do to structure a panel data in a worfile

Postby PhilipvG » Tue May 28, 2013 5:30 am

Hi,

I have (2275/5) 455 cross-sections. with 20 years of data and 5 data series (Leverage, Growth, Tang, Size, Profit)
I have got the same problem. I followed the steps of stacking from the other thread as well. Only when I want to unstack using 'variable' as series name, and 'akey' and 'id01' (also tried var01) as observation identifiers I get the error 'ID series do not uniquely identify workfile observations'. I checked my data and could not find any duplicate data so far, is there a way to check what causes this error. (I also replaced all my blanks with zeros as in the current file)

Could anyone help me out?

Thank you in advance,

Philip
Attachments
Panel Data.xlsx
(394.23 KiB) Downloaded 339 times

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

Re: how can I do to structure a panel data in a worfile

Postby EViews Gareth » Tue May 28, 2013 8:28 am

You appear to have duplicates for C000014614, C000014622, C000014759, C000014768.
Follow us on Twitter @IHSEViews

PhilipvG
Posts: 2
Joined: Tue May 28, 2013 4:54 am

Re: how can I do to structure a panel data in a worfile

Postby PhilipvG » Thu May 30, 2013 5:22 am

Dear Gareth,

Really appreciate your help. It worked, thank you


Return to “General Information and Tips and Tricks”

Who is online

Users browsing this forum: No registered users and 11 guests