Transpose Series

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

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

CNR15
Posts: 13
Joined: Thu Sep 16, 2021 7:06 am

Transpose Series

Postby CNR15 » Fri Jan 13, 2023 10:30 am

I am looking g to flip a number of series so the first observation (1990) is the last observation (2021) and vice versa. Any ideas on how to do this?

Thanks!

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

Re: Transpose Series

Postby EViews Gareth » Fri Jan 13, 2023 12:47 pm

Probably easier ways, but this works:

Code: Select all

close @wf
wfcreate a 2010 2020
series y = @nrnd


series t = @obsrange - @trend
vector v = @capplyranks(@convert(y),@convert(t))
mtos(v, yrev)

show y yrev
Follow us on Twitter @IHSEViews

CNR15
Posts: 13
Joined: Thu Sep 16, 2021 7:06 am

Re: Transpose Series

Postby CNR15 » Mon Jan 16, 2023 2:54 am

Cheers Gareth -appreciate that.


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 5 guests