Date: Thu, 29 Oct 2009 06:55:06 -0700
Reply-To: bigD <diaphanosoma@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: bigD <diaphanosoma@GMAIL.COM>
Subject: Re: calculating number of people present given their arrival and
Content-Type: text/plain; charset=ISO-8859-1
On Oct 28, 8:32 pm, "Lou" <lpog...@hotmail.com> wrote:
> "bigD" <diaphanos...@gmail.com> wrote in message
> > Hi,
> > I have a data set that contains the time a person entered the
> > emergency room and the time they left.
> > I would like to know how many people were in the emergency department
> > for each hour of the day on a weekly basis.
> The problem statement could be a little stronger. For instance, just for
> purposes of illustration, let's suppose a day is two hours long - 120
> minutes. How many hourly intervals are you concerned with? Two, starting
> from time 0 and ending at time 120? Or maybe it's 60, the first interval
> starting at time 0 and ending at time 60, the second starting at time 1 and
> ending at time 61, etc.? Or maybe it's only 1, starting at time 30 and
> ending at time 90?.
> I ask because recently I had to calculate the average number of episodes a
> patient had per 28 days over a 84 day interval, and there are 56 periods of
> 28 days in an 84 day interval.
> Whatever the answers to the above, and whatever temporal resolution you need
> (hourly intervals by the hour, minute, or second) I probably wouldn't bother
> with arrays. Instead, I'd generate a record for each interval between the
> the time a person entered the emergency roon and the time s/he left (one
> record an hour, or one record a minute, or one record a second, or whatever)
> and then count the total number of records for each timepoint using PROC
Its always hard to describe one's problem on these lists because after
working on the problem for a while, you just assume everyone knows
what you are thinking. I also try to make the post as general as
possible so that more people will read the post.
I'm only interested in getting an hourly "census" of the ED
department. The problem with not using arrays in this case is that the
data set would become fairly large. Also I think its more intuitive
to see the data across time (columns) in this case, but that's just