time between charts farrokh alemi, ph.d.. steps in construction of time in between charts 1. verify...

23
Time Between Charts Farrokh Alemi, Ph.D.

Upload: alana-saucerman

Post on 15-Dec-2015

218 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Time Between Charts Farrokh Alemi, Ph.D.. Steps in construction of time in between charts 1. Verify the chart assumptions 2. Select to draw time to success

Time Between Charts

Farrokh Alemi, Ph.D.

Page 2: Time Between Charts Farrokh Alemi, Ph.D.. Steps in construction of time in between charts 1. Verify the chart assumptions 2. Select to draw time to success

Steps in construction of time in between charts1. Verify the chart assumptions

2. Select to draw time to success or time to failure

3. Calculate time to success or failure

4. Calculate control limits

5. Plot chart

6. Interpret findings

7. Distribute chart

Page 3: Time Between Charts Farrokh Alemi, Ph.D.. Steps in construction of time in between charts 1. Verify the chart assumptions 2. Select to draw time to success

Step 1: Check assumptions

One observation per time period Dichotomous discrete rare event Independent observations over time Geometric Distribution of

observations (Longer time to event is increasingly rare)

Page 4: Time Between Charts Farrokh Alemi, Ph.D.. Steps in construction of time in between charts 1. Verify the chart assumptions 2. Select to draw time to success

Step 2: Select the event to trace

Plot time to failure if failure is more rare than success

Plot time to success if success is more rare than failure

Page 5: Time Between Charts Farrokh Alemi, Ph.D.. Steps in construction of time in between charts 1. Verify the chart assumptions 2. Select to draw time to success

Step 3: Calculate time to event

Yesterday Today Number of days to

successNumber of days to

failureStart of data collection Success 1 day 0 dayStart of data collection Failure 0 day 1 day

Success Failure 0 day 1 dayFailure Failure 0 day 1 + yesterday’s duration

of failuresFailure Success 1 day 0 day

Success Success 1 + yesterday’s length of success days

0 day

Rules for counting time to events

Page 6: Time Between Charts Farrokh Alemi, Ph.D.. Steps in construction of time in between charts 1. Verify the chart assumptions 2. Select to draw time to success

Step 4: Calculate control limits

If failures are rare, calculate R as the ratio of failure days to success days 

If success is rare, calculate R as the ratio of successful days to failure days

UCL = R + 3 [R * (1+R)] 0.5

Page 7: Time Between Charts Farrokh Alemi, Ph.D.. Steps in construction of time in between charts 1. Verify the chart assumptions 2. Select to draw time to success

Step 5: Plot control chart

X-axis is time Y-axis is either length of failures or

length of successes UCL is drawn as straight line

Page 8: Time Between Charts Farrokh Alemi, Ph.D.. Steps in construction of time in between charts 1. Verify the chart assumptions 2. Select to draw time to success

Steps 6 & 7: Interpret findings & distribute chart Any series exceeding UCL cannot be due

to chance and is a statistically significant deviation from historical patterns

If any point in a series is above the UCL, then the entire series is unusual not just the point exceeding the limit.

In distributing chart include: Assumptions Plot Interpretation

Page 9: Time Between Charts Farrokh Alemi, Ph.D.. Steps in construction of time in between charts 1. Verify the chart assumptions 2. Select to draw time to success

Example in asthma care

Patient followed for 19 days

Personal best 310

80% of personal best is 248

Is the patient’s asthma improving?

PEFRAsthma Attack

120 Yes140 Yes100 Yes150 Yes260 No150 Yes100 Yes120 Yes160 Yes300 No300 No275 No300 No200 Yes140 Yes170 Yes150 Yes150 Yes190 Yes

=if(A2<248,”Yes”,”No”)

Page 10: Time Between Charts Farrokh Alemi, Ph.D.. Steps in construction of time in between charts 1. Verify the chart assumptions 2. Select to draw time to success

Calculate attack free days

=IF(B2="Yes",0,1)

=IF(B3="Yes",0,B2+1)

Page 11: Time Between Charts Farrokh Alemi, Ph.D.. Steps in construction of time in between charts 1. Verify the chart assumptions 2. Select to draw time to success

Calculate control limits

=COUNTIF(B2:B20,"Yes")

=COUNTIF(B2:B20,“No")

=F5+3*(F5*(1+F5))^0.5

Page 12: Time Between Charts Farrokh Alemi, Ph.D.. Steps in construction of time in between charts 1. Verify the chart assumptions 2. Select to draw time to success

Plot chart

0

1

2

3

4

5

1 3 5 7 9 11 13 15 17 19

Time since start

Du

rati

on

of

sy

mp

tom

fr

ee

da

ys

Page 13: Time Between Charts Farrokh Alemi, Ph.D.. Steps in construction of time in between charts 1. Verify the chart assumptions 2. Select to draw time to success

Interpret findings & distribute

1. Recovery on the 5th day was not statistically significant

2. From 9th to 14th day, when patient was away from home, there was significant recovery.

3. After the 14th day, the patient returns home and so do the asthma attacks

0

1

2

3

4

5

1 3 5 7 9 11 13 15 17 19

Time since start

Du

rati

on

of

sy

mp

tom

fr

ee

da

ys

Page 14: Time Between Charts Farrokh Alemi, Ph.D.. Steps in construction of time in between charts 1. Verify the chart assumptions 2. Select to draw time to success

Example in Court Ordered Substance Abuse Treatment

Different corrective actions are needed for relapse or return to

poor habits

Page 15: Time Between Charts Farrokh Alemi, Ph.D.. Steps in construction of time in between charts 1. Verify the chart assumptions 2. Select to draw time to success

What Is Relapse?

1. A working definition of relapse is difficult.

2. It is a relapse, if I say it is. Otherwise it is not.

3. Behavioral definitions have been offered recently.

4. We provide a statistical definition.

Page 16: Time Between Charts Farrokh Alemi, Ph.D.. Steps in construction of time in between charts 1. Verify the chart assumptions 2. Select to draw time to success

Sample Case

1. Client was tested weekly for 20 weeks

There has been failures on 6th, 10th and 15th through 17th week

2. Are these failures return to poor habits or merely temporary relapses?

Week AbstinentWeeks

Abstinent1 Yes 1 02 Yes 2 03 Yes 3 04 Yes 4 05 Yes 5 06 No 17 Yes 6 08 Yes 7 09 Yes 8 010 No 111 Yes 9 012 Yes 10 013 Yes 11 014 Yes 12 015 No 116 No 217 No 318 Yes 13 019 Yes 14 020 Yes 15 0

Page 17: Time Between Charts Farrokh Alemi, Ph.D.. Steps in construction of time in between charts 1. Verify the chart assumptions 2. Select to draw time to success

How to score length of relapses?

Last week This week Length of relapseStart of data collection Success 0 dayStart of data collection Failure 1 day

Success Failure 1 dayFailure Failure 1 + yesterday’s length of relapse

Success Success 0 day

Rules for counting consecutive days of relapse

Page 18: Time Between Charts Farrokh Alemi, Ph.D.. Steps in construction of time in between charts 1. Verify the chart assumptions 2. Select to draw time to success

Calculating Length of Relapse in Excel

If current date is success, then 0

Otherwise, if previous day is relapse

then add 1 to previous days count, if not relapse

Then set current count to 1 day of relapse

Page 19: Time Between Charts Farrokh Alemi, Ph.D.. Steps in construction of time in between charts 1. Verify the chart assumptions 2. Select to draw time to success

Check Assumptions

1. Time to success should have a geometrically decaying shape

Eye examination suggests the assumption is reasonable

2. Frequency of failures are low.

Histogram

0

2

4

6

8

10

12

0 1 2 3

Days in betweenF

req

ue

ncy

Page 20: Time Between Charts Farrokh Alemi, Ph.D.. Steps in construction of time in between charts 1. Verify the chart assumptions 2. Select to draw time to success

Calculate Upper Control Limit

=COUNT(C2:C21)-COUNTIF(C2:C21, 0)

=COUNTIF(C2:C21,0)

=E2/E3

=E4+3*(E4*(1+E4))^0.5

Page 21: Time Between Charts Farrokh Alemi, Ph.D.. Steps in construction of time in between charts 1. Verify the chart assumptions 2. Select to draw time to success

Step 4: Plot the Relapse Chart

0

1

2

3

4

1 3 5 7 9 11 13 15 17 19

Weeks

Len

gth

of

rela

pse

UCL

Page 22: Time Between Charts Farrokh Alemi, Ph.D.. Steps in construction of time in between charts 1. Verify the chart assumptions 2. Select to draw time to success

Interpret the Chart

1. Points below control limit could be due to chance events. Despite failures, the underlying habit is repeating as before.

There were two lapses

2. Series with one point above control limit have less than 1% chance of occurring due to chance alone. They represent changes in the underlying repetition of the habit.

There is one return to drug use

Page 23: Time Between Charts Farrokh Alemi, Ph.D.. Steps in construction of time in between charts 1. Verify the chart assumptions 2. Select to draw time to success

Take Home Lesson

Time in between charts are effective tools for examining rare

events