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
Related Posts with Comparing string variables and extracting string variables
Possible bug in "label save" in Stata 16?Hi everyone, I wanted to bring this up in the forum in case I'm missing something obvious, and it's…
Compare coefficients across models for panelI want to test the difference between the coeffiecients on " huaf "and " lauf " which are ratios of …
Running regressions in a loopHi all, I have got a large dataset available which has 14 yearly datapoints for several independent…
Time Series RegressionHi all, I'm working on the following sample. Code: * Example generated by -dataex-. To install: s…
existing variable values as new variableshi my data goes like this: var1 var2 10000 a 10000 b 10000 c 10001 a 10001 b i want my data to loo…
Subscribe to:
Post Comments (Atom)
0 Response to Comparing string variables and extracting string variables
Post a Comment