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: Overlapping averages
Matthew Bombyk <firstname.lastname@example.org>
st: Overlapping averages
Mon, 27 Jun 2011 22:16:31 -0500
I have a pretty long and complicated question:
My research group has data on the level of average treatment
compliance per day (average hours of use of a personal medical device)
for a number of subjects over various time intervals. So we might have
a subject that was observed from day 3 to 10 and had an average daily
usage of 5 hours over that period. We don't have the actual usage data
on a given day. We have other panel data on these subjects and want to
assign an average treatment compliance number to each day.
Many subjects have two time intervals that overlap, say one starts on
day 3 and ends day 10, the other starts day 7 and ends day 20. We have
average usage over both of these periods. I've done some algebra and
found that it is impossible to calculate the average exactly for the
overlapping time interval, 7 to 10 in our example. But, I am wondering
if there is a "best way" to incorporate the information I have into a
better estimate than just assigning one of the period's values to the
overlap, or doing a simple average?
I have a few criteria that I thought would be useful:
1) if the two intervals have the same start or end date, we CAN
calculate the overlap exactly (namely the shorter interval). So the
weighted average should collapse to this when appropriate.
2) If the intervals are the same length, we should just get a simple average.
3) if interval 1 is smaller than interval 2, interval 1 should get more weight.
I thought about using w1=t22/(t11+t22) and w2=t11/(t11+t22), where w1
is the weight on the first average, and t11 and t22 are the lengths of
the nonoverlapping portions of the first and second time intervals,
respectively, and t12 is the length of the overlap.
Period 2 _________________________
(These might turn out poorly, if so sorry, just ignore them!)
The problem with this is that if the overlap is really large compared
to the non-overlapping portions, we can put way too much weight on the
shorter interval if the nonoverlapping portions have a very high
ratio, even if they only differ absolutely by a small amount.
We also thought about using w1=t12/(t12+t11) but this fails on
criterion #1 above.
Any comments appreciated. Thanks!
* For searches and help try: