Page 1 of 1

Dummy for complex text strings

Posted: Mon Jul 18, 2011 1:44 pm
by VALIA
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

Re: Dummy for complex text strings

Posted: Mon Jul 18, 2011 1:57 pm
by EViews Gareth
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.

Re: Dummy for complex text strings

Posted: Mon Jul 18, 2011 2:17 pm
by VALIA
Thanks for the promt response, Gareth.
I'll try.
Valia

Re: Dummy for complex text strings

Posted: Mon Jul 18, 2011 2:29 pm
by VALIA
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

Re: Dummy for complex text strings

Posted: Mon May 14, 2012 5:01 am
by VALIA
I think I can manage to do this, thanks again,
valia