Dummy for complex text strings

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

VALIA
Posts: 7
Joined: Mon Jul 18, 2011 12:55 pm

Dummy for complex text strings

Postby VALIA » Mon Jul 18, 2011 1:44 pm

Dummy again... this time the task becomes more complicated because it is necessary to construct a dummy based on the text strings that has to be considered carefully. There is an information about job titles for more than 8000 person. We need to identify person who holds CEO/chairman position.
There are 71 different definitions that can be classified as a CEO and as a Chairman in the resource file (e.g. Acting CEO, Acting CEO/Chief Creative Officer, Acting Chairman (Independent NED), Acting Chairman (Senior Independent NED), etc) and about 50 definitions that cannot be classified (e.g. Assistant CEO, Deputy CEO, Deputy CEO/Division Head, Deputy CEO/GFD, Deputy Chairman, etc) which makes it very difficult to pick what we need.
Is there any possibility to separate these two groups of definitions and construct the dummy?
Many thanks and best regards,
Valia

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

Re: Dummy for complex text strings

Postby EViews Gareth » Mon Jul 18, 2011 1:57 pm

In a program, yes. Assuming you have a list of terms that classifies as a CEO, then something like this:

Code: Select all

%ceoterms = " ""Acting CEO"" ""Acting CEO/Chief Creative Officer"" ""Acting Chairman (Independent NED)"" ""Acting Chairman (Senior Independent NED)"" " for !i = 1 to @wcount(%ceoterms) %ceoword = @word(%ceoterms, !i) smpl if job = %ceoword series dummy = 1 next
Where job is the name of the series containing job titles, and dummy is the name of the dummy variable.

VALIA
Posts: 7
Joined: Mon Jul 18, 2011 12:55 pm

Re: Dummy for complex text strings

Postby VALIA » Mon Jul 18, 2011 2:17 pm

Thanks for the promt response, Gareth.
I'll try.
Valia

VALIA
Posts: 7
Joined: Mon Jul 18, 2011 12:55 pm

Re: Dummy for complex text strings

Postby VALIA » Mon Jul 18, 2011 2:29 pm

Sorry for bothering you again.
I need dummy if chair and CEO is the same person. Could you help me with this, please?

thanks again,
Valia

VALIA
Posts: 7
Joined: Mon Jul 18, 2011 12:55 pm

Re: Dummy for complex text strings

Postby VALIA » Mon May 14, 2012 5:01 am

I think I can manage to do this, thanks again,
valia


Last bumped by VALIA on Mon May 14, 2012 5:01 am.


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests