Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Hitesh Chandwani <hchandwani.stata@gmail.com> |
To | statalist@hsphsun2.harvard.edu |
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/