Hi Eviews users,
I have a dataset downloaded from the WB like this.
I have tried to reshape to the standard long panel as usual by stacking the _? year columns but I cannot spread the multiple series and their associated values as can be easily done in R.
Please guide me with a suggestion.
Thanks!
Reshape Worldbank dataset from wide to long
Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator
-
- Posts: 14
- Joined: Fri Apr 27, 2018 12:08 pm
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13330
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Reshape Worldbank dataset from wide to long
Code: Select all
close @wf
wfopen wb_panel_sample.xlsx colhead=1
pagestruct(none)
pagestack num? @ *? *
alpha sername = @makevalidname(indicators)
d id01
pageunstack sername var01 iso3
d indicators* sername num
pagestruct @date(var01) iso3
rename num* *
d var01
Follow us on Twitter @IHSEViews
-
- Posts: 14
- Joined: Fri Apr 27, 2018 12:08 pm
Re: Reshape Worldbank dataset from wide to long
Thanks, Gareth. It works perfectly! :))
Who is online
Users browsing this forum: No registered users and 5 guests