Page 1 of 1
Reshaping data into panel data
Posted: Mon Mar 09, 2015 10:15 am
by lana
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
Re: Reshaping data into panel data
Posted: Mon Mar 09, 2015 10:27 am
by EViews Gareth
This post is quite indecipherable.
Re: Reshaping data into panel data
Posted: Mon Mar 09, 2015 11:05 am
by lana
Sorry
i'll share my data as soon as possible. I don't have it on my phone
Thank you
Re: Reshaping data into panel data
Posted: Mon Mar 09, 2015 12:24 pm
by lana
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
Re: Reshaping data into panel data
Posted: Mon Mar 09, 2015 12:28 pm
by lana
I forgot to mention that the data is in the "data" sheet and what I want to get is in sheet 2 named "result"
Re: Reshaping data into panel data
Posted: Mon Mar 09, 2015 1:14 pm
by EViews Gareth
I still have no idea what you want.
Re: Reshaping data into panel data
Posted: Mon Mar 09, 2015 1:31 pm
by startz
For a particular cross-section, the OP has the data for the variable aadcrobs in 3 columns, one each for 2012, 2013, and 2014.
Re: Reshaping data into panel data
Posted: Mon Mar 09, 2015 1:34 pm
by lana
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
Re: Reshaping data into panel data
Posted: Mon Mar 09, 2015 1:50 pm
by EViews Gareth
Can you provide the files?
Re: Reshaping data into panel data
Posted: Mon Mar 09, 2015 2:04 pm
by lana
I hope it will help :(
Re: Reshaping data into panel data
Posted: Mon Mar 09, 2015 2:15 pm
by EViews Gareth
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)
Re: Reshaping data into panel data
Posted: Mon Mar 09, 2015 2:17 pm
by lana
where should I put this? I import data to eviews first ?
Re: Reshaping data into panel data
Posted: Mon Mar 09, 2015 2:33 pm
by EViews Gareth
You can copy each line into the command window one at a time.
Re: Reshaping data into panel data
Posted: Mon Mar 09, 2015 2:57 pm
by lana
I don't know what to tell you realy you've saved my live
thank you so much . I was looking for a solution for a week now
thank you for what you do for the others