Statalist


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

st: Is it necessary to sort data before using -cf-?


From   [email protected]
To   statalist<[email protected]>
Subject   st: Is it necessary to sort data before using -cf-?
Date   Sun, 29 Nov 2009 17:36:16 +0800

Dear statalists,

Is it necessary to sort data before using -cf-? 
Without sorting, I found two same datasets are reported difference. However, I found no reference in -help cf-.
If necessary, how to determine the sorted variable(s) if I compare all the variables or certain variables?
Does the sorted variable need to have no duplicates?

For example,

. sysuse auto,clear
(1978 Automobile Data)

. sort turn

. save new,replace
file new.dta saved

. sysuse auto,clear
(1978 Automobile Data)

. sort rep78

. cf _all using new
            make:  74 mismatches
           price:  74 mismatches
             mpg:  69 mismatches
           rep78:  63 mismatches
        headroom:  64 mismatches
           trunk:  72 mismatches
          weight:  73 mismatches
          length:  73 mismatches
            turn:  71 mismatches
    displacement:  72 mismatches
      gear_ratio:  72 mismatches
         foreign:  42 mismatches
r(9);

. 
Could anyone help me? Thank you.


Best regards,
Rose


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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