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: Picking out first date from a series conditional on values of other variables


From   Hitesh Chandwani <[email protected]>
To   [email protected]
Subject   st: Picking out first date from a series conditional on values of other variables
Date   Thu, 19 Apr 2012 01:38:15 -0500

Hello all,

I am analyzing a dataset for medication compliance.

I am interested in the first day that there was a break in medication
possession. From the date variables (disp_date1-disp_date14 OR
disp_date`k'), I need to pick out the first date of the break for each
patient where
variable A`k' > variable B`k'.

I've been trying for hours but I can't get Stata to do exactly what I
want. I tried -egen-, and some loops but to no avail.

Does someone have any inputs?

-- 
Hitesh S. Chandwani
University of Texas at Austin
*
*   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