Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: re: checking for common data entries across variables


From   n j cox <[email protected]>
To   [email protected]
Subject   Re: st: re: checking for common data entries across variables
Date   Tue, 24 Apr 2007 21:05:34 +0100

-countmatch- on SSC is dedicated to this problem. It
counts matches, but as a useful side-product can list
them too.

countmatch var1 var2

Note that

countmatch var2 var1

is in general different. The help file includes many
comments on the problem, related problems, and details of various options.

Nick
[email protected]

Devendra Amre

Is there a STATA command similar to VLOOKUP that is available in EXCEL?
For example, I have a list of IDs as 2 variables. I wish to check if
any ID listed in var1 are present in var2..here is an example:

var1           var2
M101        F100
F100         M101
F120         F130
F145         M101

IDs M101 and F100 are common..is there some way of tagging these IDs?


*
*   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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index