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: Identifying Experiment subjects that belong in both the Placebo and Experiment Groups
From
Beatrice Benavidez <[email protected]>
To
[email protected]
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/