How about -joinby- the two data sets (given that values of both lic_no
and psycho_lic_no may be shared by more than one obs) and check the
values of _merge?
On Jan 16, 2008 1:51 PM, Gao Liu <[email protected]> wrote:
> Hi, Statalist:
>
> I have two datasets A and B. I need to create a dummy variable in A to
> tell me whether the value of a string variable (say lic_no ) in A
> matches any value in the variable of psycho_lic_no in B. Simply put, I
> want to see whether the value for each obs. in A is on a list. But as
> the list (the value of psycho_lic_no in B) is so long (over 10000), it
> is inconvenient to copy and paste all the values, and compare them
> with the lic_no one by one.
>
> Any good way to make the job easier? Thank you.
>
> Best
>
> Gao
> *
> * For searches and help try:
> * http://www.stata.com/support/faqs/res/findit.html
> * http://www.stata.com/support/statalist/faq
> * http://www.ats.ucla.edu/stat/stata/
>
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/