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 on April 23, and its replacement, statalist.org is already up and running.


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

[no subject]



. help collapse

Nick

On Mon, May 2, 2011 at 5:21 PM, Jet <lsj555@gmail.com> wrote:

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

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index