restructure workfile

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

tvonbrasch
Posts: 569
Joined: Fri Apr 15, 2011 5:35 am

restructure workfile

Postby tvonbrasch » Tue Feb 04, 2014 1:44 pm

Hi Eviews team,

i have imported data into the workfile unstacking (attached), with a list of countrynames (as an alpha), a series named gfcf and a series named year (= 2005 for all countries)

what is the command to structure the workfile as an annual workfile (2005 2005) with the gfcf variable for each country, i.e., gfcf_countryname ?

sincerely
thomas von brasch
Attachments
unstacking.WF1
(16.58 KiB) Downloaded 245 times

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

Re: restructure workfile

Postby EViews Gareth » Tue Feb 04, 2014 2:26 pm

Code: Select all

series crossid = @trend+1 pagecreate(page=2) a 2002 2005 31 series year = @val(@datestr(@date, "YYYY")) copy 1\country 2\country @src crossid @dest crossid copy 1\gfcf 2\gfcf @src crossid year @dest crossid year alpha validnames = @makevalidname(country) pageunstack(namepat="*_?") validnames dateid @ gfcf

tvonbrasch
Posts: 569
Joined: Fri Apr 15, 2011 5:35 am

Re: restructure workfile

Postby tvonbrasch » Wed Feb 05, 2014 12:11 am

Thank you Gareth! that was just what i was looking for.
Thomas


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests