Dear members,
I have a question related to the topic of comparing string variables and extracting string variables. I have the following two variables and example data:
Email1 | Email2
maja.li@hhh.com,andi.ko@ff.de,adam.o@gji.com | maja.li@hhh.com,andi.ko@ff.de
chris@kkk.com,david.r@fffff.com,karla.llll@dddd.fr | karla.llll@dddd.fr
I’d like to create a third variable, that indicates specifically which email addresses are present in var:Email1, but not in var:Email2. For the above stated data, this would be (Var3):
Email1 | Email2 | Var3
maja.li@hhh.com,andi.ko@ff.de,adam.o@gji.com | maja.li@hhh.com,andi.ko@ff.de | adam.o@gji.com
chris@kkk.com,david.r@fffff.com,karla.llll@dddd.fr | karla.llll@dddd.fr | chris@kkk.com,david.r@fffff.com
Is this even possible, and if so, how can I accomplish this?
All variables are string variables and the email addresses are separated by a comma (no space character between them). I am using Stata 12.
Thank you very much in advance.
Maja
0 Response to Comparing string variables and extracting string variables
Post a Comment