Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: comparing contents of two columns (variables)


From   James Bernard <jamesstatalist@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: comparing contents of two columns (variables)
Date   Sun, 14 Apr 2013 17:31:50 +0800

Hi all,

I was wondering if you know of any command in stata that can compare
contents of two columns. Imagive I have two columns

  A                 B
-------           ---------

304             112
203             123
776             304
334             555
212             111
111             444
123             999
200
300
277

Now I want to count how many of the contents of column B cannot be
found in column A (which is 5 out of 7)

I looked up the web and found that someone talked about a command
called CF3, but I could not get anything more about this command.

Thanks in advance

James
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index