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]

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


From   Nick Cox <njcoxstata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Picking out first date from a series conditional on values of other variables
Date   Thu, 19 Apr 2012 08:59:56 +0100

Already answered. We can't explain what was wrong with your code if
you don't show it.

On Thu, Apr 19, 2012 at 7:38 AM, Hitesh Chandwani
<hchandwani.stata@gmail.com> wrote:
> 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/

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