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: Identifying Experiment subjects that belong in both the Placebo and Experiment Groups


From   Beatrice Benavidez <beatricestata1711@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: Identifying Experiment subjects that belong in both the Placebo and Experiment Groups
Date   Sun, 21 Oct 2012 15:38:50 +0400

Hi All,

I have a dataset like below but for thousands of subjects (IDs).

However, in my experiment a particular subject may have received both
the treatment and placebo at the same or different dates (such as
person of ID 2 and ID 1 respectively). This occurrence would then
invalidate the experiment. I would then like to find a way to identify
and flag those subjects.

Date          ID          Received
1/1             1           Treatment
1/1             2           Treatment
1/1             2            Placebo
17/1           1            Placebo
18/1           3            Treatment

I know I'd have to do bysort ID: gen flag = 1 if ...

Thank you!

Kind regards,


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