Reshaping data into panel data

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

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

lana
Posts: 22
Joined: Thu Mar 05, 2015 12:24 am

Reshaping data into panel data

Postby lana » Mon Mar 09, 2015 10:15 am

Hello,
Have a problem with my data! The dates are stuck with the variables i mean for each cross section in row i have the variable and the date stack in the same column
I dant to get for each cross section the dates in row and the variables in column
How can i do this
Thank you

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

Re: Reshaping data into panel data

Postby EViews Gareth » Mon Mar 09, 2015 10:27 am

This post is quite indecipherable.

lana
Posts: 22
Joined: Thu Mar 05, 2015 12:24 am

Re: Reshaping data into panel data

Postby lana » Mon Mar 09, 2015 11:05 am

Sorry
i'll share my data as soon as possible. I don't have it on my phone
Thank you

lana
Posts: 22
Joined: Thu Mar 05, 2015 12:24 am

Re: Reshaping data into panel data

Postby lana » Mon Mar 09, 2015 12:24 pm

hello
this is my data. what is in yellow is my cross sections and what is in yellow are my cross sections and what is in blue is the variables with dates that I want to separate
thank you
Attachments
data.xlsx
(10.68 KiB) Downloaded 439 times

lana
Posts: 22
Joined: Thu Mar 05, 2015 12:24 am

Re: Reshaping data into panel data

Postby lana » Mon Mar 09, 2015 12:28 pm

I forgot to mention that the data is in the "data" sheet and what I want to get is in sheet 2 named "result"

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

Re: Reshaping data into panel data

Postby EViews Gareth » Mon Mar 09, 2015 1:14 pm

I still have no idea what you want.

startz
Non-normality and collinearity are NOT problems!
Posts: 3797
Joined: Wed Sep 17, 2008 2:25 pm

Re: Reshaping data into panel data

Postby startz » Mon Mar 09, 2015 1:31 pm

For a particular cross-section, the OP has the data for the variable aadcrobs in 3 columns, one each for 2012, 2013, and 2014.

lana
Posts: 22
Joined: Thu Mar 05, 2015 12:24 am

Re: Reshaping data into panel data

Postby lana » Mon Mar 09, 2015 1:34 pm

ok, can you please see the attached files "data1" is the initial file and what I want to have is "data2".
number index is the cross sections but as you can see in "data1" variable (ETTAR and others that you can't see on the capture) are gathered with the dates
Attachments
Data2.docx
(187.51 KiB) Downloaded 655 times
data1.docx
(168.72 KiB) Downloaded 490 times

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

Re: Reshaping data into panel data

Postby EViews Gareth » Mon Mar 09, 2015 1:50 pm

Can you provide the files?

lana
Posts: 22
Joined: Thu Mar 05, 2015 12:24 am

Re: Reshaping data into panel data

Postby lana » Mon Mar 09, 2015 2:04 pm

I hope it will help :(
Attachments
data.xlsx
(54.12 KiB) Downloaded 681 times
result.xlsx
(12.82 KiB) Downloaded 798 times

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

Re: Reshaping data into panel data

Postby EViews Gareth » Mon Mar 09, 2015 2:15 pm

Code: Select all

wfopen data.xlsx d *_year* pagestack 2007 2008 2009 2010 2011 2012 2013 2014 rename d_th_eur_ dd_th_eur_ rename *_th_eur_ * pagestruct index_number @date(var01)

lana
Posts: 22
Joined: Thu Mar 05, 2015 12:24 am

Re: Reshaping data into panel data

Postby lana » Mon Mar 09, 2015 2:17 pm

where should I put this? I import data to eviews first ?

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

Re: Reshaping data into panel data

Postby EViews Gareth » Mon Mar 09, 2015 2:33 pm

You can copy each line into the command window one at a time.

lana
Posts: 22
Joined: Thu Mar 05, 2015 12:24 am

Re: Reshaping data into panel data

Postby lana » Mon Mar 09, 2015 2:57 pm

I don't know what to tell you realy you've saved my live :cry: :cry: :cry:
thank you so much . I was looking for a solution for a week now
thank you for what you do for the others


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests