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]

st: duplicate cases in data cleaning


From   Jet <[email protected]>
To   [email protected]
Subject   st: duplicate cases in data cleaning
Date   Mon, 2 May 2011 12:21:07 -0400

Hi,

    Could anyone point me to how to resolve the following situation
during the stage of data cleaning?

The structure of the data is like this. If an individual has taken any
type of hypertension medicine, then drug is coded as 1.

    ID    Drug
  101      1
  101      0
  200      1
  200      1

Now I need to combine cases by adding up the "drug" variable such that
it looks like:

   ID    Drug
  101      1
  200      2

Thank you  very much


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