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]

st: Picking out first date from a series conditional on values of other variables


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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index