I have a string variable and want to do a comparison to see if its values match with any of a set of strings stored in another macro.
Here is an example somewhat close to what I am thinking of...
The expected output is generating a 1 for observations 10, 11, 12. Howwever it only generates a 1 for observation 10.
Thanks for reading.
Here is an example somewhat close to what I am thinking of...
Code:
sysuse auto, clear levelsof make in 10/12, local(Names) gen FlagMember = (make == `Names')
Thanks for reading.
Comment