Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: Comparing two data set


From   Dirk Enzmann <[email protected]>
To   [email protected]
Subject   Re: st: Comparing two data set
Date   Sun, 06 Mar 2011 20:44:59 +0100

In reply to

http://www.stata.com/statalist/archive/2011-03/msg00337.html
---------------------------------------------------------------

Thanks, it shows how you would use -append- to identify cases that are in one dataset but not in the other.

However, this did not help much. You did argue against "I need -merge- because I want to find out exactly which values of which cases have been entered differently (and list the problems using -foreach-). " and you wrote "-merge- may be convenient but I don't think it is essential."

I still don't know how to compare the two datasets using -append- instead of -merge- to find out exactly which values of which cases have been entered differently, such as I did, for example, in the two tables below:

  +--------------------------------+
  | patient   agegrp_orig   agegrp |
  |--------------------------------|
  |      11             1        2 |
  |      44             3        2 |
  |      55             3        2 |
  |      66             1        2 |
  |      77             1        2 |
  |     110             3        2 |
  +--------------------------------+

  +--------------------------------------+
  | patient   bp_before_orig   bp_before |
  |--------------------------------------|
  |       1              143         163 |
  |       2              163         143 |
  |     100              145         143 |
  +--------------------------------------+

How can this be done using -append-?

Dirk
*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index