Dear Statalist,
This is quite possible a rather naive question, but for some reason I am
stuck.
I have data from a clinic. I have the time each patient checks in
(arrdatetime), the time they leave (depdatetime) and the time taken to
first consultation (waittime) in minutes. What I would like to do is
compare the number of people in the clinic for each patient at
arrdatetime with waittime.
So far the best I can come up with is to write a loop, going through
every patients' arrdatetime and counting up those whose arrival and
departure times span this value. But I have rather a lot of data and
this seems terribly inefficient.
Simon
*
* 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/