Coding String/Character series as Numeric

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

Chthoniid
Posts: 24
Joined: Mon Oct 22, 2012 6:02 pm

Coding String/Character series as Numeric

Postby Chthoniid » Mon May 23, 2016 8:24 pm

I've got a data series that is just a list of village names in PNG. I'd like to assign each one a unique numeric code (to make programming For/NEXT loops easier).
So Village A gets value of 1, village B 2, Village C 3 etc.

I'm just not seeing in programming or command reference how to achieve this...

TIA

B

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

Re: Coding String/Character series as Numeric

Postby EViews Gareth » Mon May 23, 2016 8:43 pm

Look at the valmap object

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: Coding String/Character series as Numeric

Postby EViews Glenn » Tue May 24, 2016 9:41 am

And to that end, the alpha series that you have will have a Proc/Make mapped series which will create the numeric series and valmap automatically.

Chthoniid
Posts: 24
Joined: Mon Oct 22, 2012 6:02 pm

Re: Coding String/Character series as Numeric

Postby Chthoniid » Tue May 24, 2016 5:11 pm

Excellent- the proc/map is beautifully simple


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 1 guest