How many different entities are we talking about? If there are not many of
them and if I understood you correctly, you can easily use -strpos()-
function as below, otherwise you can still use the -strpos()- function in a
loop.
e.g.
gen same_entities = 1 if strpos(name1,"AOL") | strpos(name2,"AOL").. etc
replace same_entities = 2 if ...
I suggest you change the names into all lower or all upper case to make it
easier to be picked up. You might want to delete all the space within names
as well e.g. "A O L" to "AOL". Look at -help strfun-
BW,
Shahrul
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/