funnel plots: visualizing small area estimates - sas group presentation… · funnel plots:...

38
Funnel Visualizing Smal eSUG M Doug D Surveillance and As Community and Popul Alberta Health l Plots: ll Area Estimates May 2010 Dover ssessment Branch lation Health Division and Wellness

Upload: hoangtram

Post on 19-Mar-2018

219 views

Category:

Documents


7 download

TRANSCRIPT

Page 1: Funnel Plots: Visualizing Small Area Estimates - SAS Group Presentation… · Funnel Plots: Visualizing Small Area Estimates eSUG May 2010 Doug Dover Surveillance and Assessment Branch

Funnel Plots: Visualizing Small Area Estimates

eSUG May 2010

Doug Dover Surveillance and Assessment Branch

Community and Population Health Division Alberta Health and Wellness

Funnel Plots: Visualizing Small Area Estimates

eSUG May 2010

Doug Dover Surveillance and Assessment Branch

Community and Population Health Division Alberta Health and Wellness

Page 2: Funnel Plots: Visualizing Small Area Estimates - SAS Group Presentation… · Funnel Plots: Visualizing Small Area Estimates eSUG May 2010 Doug Dover Surveillance and Assessment Branch

Funnel Plots

The need to visualize small area rates. The need to visualize small area rates.

Page 3: Funnel Plots: Visualizing Small Area Estimates - SAS Group Presentation… · Funnel Plots: Visualizing Small Area Estimates eSUG May 2010 Doug Dover Surveillance and Assessment Branch

Small Area Rates

Issues:

•large variability in small populations

•ranking and rates •ranking and rates

•identification of anomalies

Small Area Rates

large variability in small populations

ranking and rates ranking and rates

identification of anomalies

Page 4: Funnel Plots: Visualizing Small Area Estimates - SAS Group Presentation… · Funnel Plots: Visualizing Small Area Estimates eSUG May 2010 Doug Dover Surveillance and Assessment Branch

Funnel Plots ­

Developed as alternatives to caterpillar or league plots.

­ History

Developed as alternatives to caterpillar or league plots.

Page 5: Funnel Plots: Visualizing Small Area Estimates - SAS Group Presentation… · Funnel Plots: Visualizing Small Area Estimates eSUG May 2010 Doug Dover Surveillance and Assessment Branch

Funnel Plots

Funnel plots show point estimates for small areas or domains against a background “expected” confidence interval. interval.

Funnel plots show point estimates for small areas or domains against a background “expected” confidence

Page 6: Funnel Plots: Visualizing Small Area Estimates - SAS Group Presentation… · Funnel Plots: Visualizing Small Area Estimates eSUG May 2010 Doug Dover Surveillance and Assessment Branch

Funnel Plots Expected Standard Errors

The “expected” standard error in the binomial case is given by

ˆ ˆ (1 ) / p p n − where is the overall rate

and n varies freely.

ˆ ˆ (1 ) / p p n − ˆ p

Expected Standard Errors

The “expected” standard error in the binomial case is given by

ˆ ˆ (1 ) / p p n − where is the overall rate

varies freely.

ˆ ˆ (1 ) / p p n −

Page 7: Funnel Plots: Visualizing Small Area Estimates - SAS Group Presentation… · Funnel Plots: Visualizing Small Area Estimates eSUG May 2010 Doug Dover Surveillance and Assessment Branch

Funnel Plots Expected Standard Errors Expected Standard Errors

Page 8: Funnel Plots: Visualizing Small Area Estimates - SAS Group Presentation… · Funnel Plots: Visualizing Small Area Estimates eSUG May 2010 Doug Dover Surveillance and Assessment Branch

Funnel Plots Expected Standard Errors

small n, large CI

Expected Standard Errors

, large CI

Page 9: Funnel Plots: Visualizing Small Area Estimates - SAS Group Presentation… · Funnel Plots: Visualizing Small Area Estimates eSUG May 2010 Doug Dover Surveillance and Assessment Branch

Funnel Plots Expected Standard Errors

small n, large CI

Expected Standard Errors

, large CI

large n, small CI

Page 10: Funnel Plots: Visualizing Small Area Estimates - SAS Group Presentation… · Funnel Plots: Visualizing Small Area Estimates eSUG May 2010 Doug Dover Surveillance and Assessment Branch

Funnel Plots Expected Standard Errors

small n, large CI

Expected Standard Errors

, large CI Limits centered at a fixed rate

large n, small CI

Page 11: Funnel Plots: Visualizing Small Area Estimates - SAS Group Presentation… · Funnel Plots: Visualizing Small Area Estimates eSUG May 2010 Doug Dover Surveillance and Assessment Branch

Funnel Plots Nice Example

Page 12: Funnel Plots: Visualizing Small Area Estimates - SAS Group Presentation… · Funnel Plots: Visualizing Small Area Estimates eSUG May 2010 Doug Dover Surveillance and Assessment Branch

Funnel Plots Nice Example

Same disease,

a few years later…

Page 13: Funnel Plots: Visualizing Small Area Estimates - SAS Group Presentation… · Funnel Plots: Visualizing Small Area Estimates eSUG May 2010 Doug Dover Surveillance and Assessment Branch

Funnel Plots in SAS

The funnel plots presented so far were created in SAS, but why not just use Excel for such simple graphs?

The funnel plots presented so far were created in SAS, but why not just use Excel for such simple graphs?

Page 14: Funnel Plots: Visualizing Small Area Estimates - SAS Group Presentation… · Funnel Plots: Visualizing Small Area Estimates eSUG May 2010 Doug Dover Surveillance and Assessment Branch

Funnel Plots in SAS

Because SAS is cool! Because SAS is cool!

Page 15: Funnel Plots: Visualizing Small Area Estimates - SAS Group Presentation… · Funnel Plots: Visualizing Small Area Estimates eSUG May 2010 Doug Dover Surveillance and Assessment Branch

Funnel Plots Which point?? Which point??

Page 16: Funnel Plots: Visualizing Small Area Estimates - SAS Group Presentation… · Funnel Plots: Visualizing Small Area Estimates eSUG May 2010 Doug Dover Surveillance and Assessment Branch

Funnel Plots Mouse over!

Page 17: Funnel Plots: Visualizing Small Area Estimates - SAS Group Presentation… · Funnel Plots: Visualizing Small Area Estimates eSUG May 2010 Doug Dover Surveillance and Assessment Branch

Funnel Plots SAS mouse over

*make funnel plot*;

goptions reset=symbol device=activex; ods html body="&htmlfile" path="&htmlpath" parameters=("ZoomControlEnabled"="false" "DataTipStyle"="stick_fixed");

Proc GPlot Data=_Funnel_; Plot &rate*&pop lfunnelLimit*&pop ufunnelLimit*&pop

/ overlay / overlay hminor = 0 vminor = 0 vaxis = axis1 vref=&ABvalue cvref=purple lvref=3 frame anno=anno

html=popup ;

format &pop comma12.; run; quit; ods html close;

SAS mouse over

device=activex; ods html body="&htmlfile" path="&htmlpath" parameters=("ZoomControlEnabled"="false" "DataTipStyle"="stick_fixed");

Plot &rate*&pop lfunnelLimit*&pop ufunnelLimit*&pop

vref=&ABvalue cvref=purple lvref=3

Page 18: Funnel Plots: Visualizing Small Area Estimates - SAS Group Presentation… · Funnel Plots: Visualizing Small Area Estimates eSUG May 2010 Doug Dover Surveillance and Assessment Branch

Funnel Plots SAS mouse over

*make popup text*; Data _Funnel_; Set _Funnel_; popup='ALT="'||compress(&PopupText)||'"';

run;

SAS mouse over

popup='ALT="'||compress(&PopupText)||'"';

Page 19: Funnel Plots: Visualizing Small Area Estimates - SAS Group Presentation… · Funnel Plots: Visualizing Small Area Estimates eSUG May 2010 Doug Dover Surveillance and Assessment Branch

Funnel Plots Are there commonalities? Are there commonalities?

Page 20: Funnel Plots: Visualizing Small Area Estimates - SAS Group Presentation… · Funnel Plots: Visualizing Small Area Estimates eSUG May 2010 Doug Dover Surveillance and Assessment Branch

Funnel Plots Text!

Page 21: Funnel Plots: Visualizing Small Area Estimates - SAS Group Presentation… · Funnel Plots: Visualizing Small Area Estimates eSUG May 2010 Doug Dover Surveillance and Assessment Branch

Funnel Plots Colour!

Page 22: Funnel Plots: Visualizing Small Area Estimates - SAS Group Presentation… · Funnel Plots: Visualizing Small Area Estimates eSUG May 2010 Doug Dover Surveillance and Assessment Branch

Funnel Plots SAS annotate

*make funnel plot*; goptions reset=symbol device=activex; ods html body="&htmlfile" path="&htmlpath" parameters=("ZoomControlEnabled"="false" "DataTipStyle"="stick_fixed");

Proc GPlot Data=_Funnel_; Plot &rate*&pop lfunnelLimit*&pop ufunnelLimit*&pop

/ overlay / overlay hminor = 0 vminor = 0 vaxis = axis1 vref=&ABvalue cvref=purple lvref=3 frame

anno=annods html=popup ;

format &pop comma12.; run; quit; ods html close;

goptions reset=symbol device=activex; ods html body="&htmlfile" path="&htmlpath" parameters=("ZoomControlEnabled"="false" "DataTipStyle"="stick_fixed");

Plot &rate*&pop lfunnelLimit*&pop ufunnelLimit*&pop

vref=&ABvalue cvref=purple lvref=3

Page 23: Funnel Plots: Visualizing Small Area Estimates - SAS Group Presentation… · Funnel Plots: Visualizing Small Area Estimates eSUG May 2010 Doug Dover Surveillance and Assessment Branch

Funnel Plots SAS annotate

*annotations*; Data anno_label; Set anno_label; format function $8. text $12. style $12.; retain xsys '2' ysys '2'; retain when 'A';

*move to point*; function='move'; x=&pop; y=&rate; output;

*decide where to draw line to*; offset_xpct = 0.03*(&maxpop ‐ offset_ypct = 0.02*(&maxrate ‐ *min() and max() keep x,y coords within plot*; if _OOL_=+1 then do; x=min(x+offset_xpct,&maxpop);

y=min(y+offset_ypct,&maxrate); end;

if _OOL_= 0 then do; x=min(x+offset_xpct,&maxpop); end;

if _OOL_=‐1 then do; x=min(x+offset_xpct,&maxpop); y=max(y‐offset_ypct,&minrate);

end; *draw line*; function='draw'; line=1; size=1; output;

format function $8. text $12. style $12.;

function='move'; x=&pop; y=&rate;

*decide where to draw line to*; ‐ &minpop ); ‐ &minrate);

*min() and max() keep x,y coords within plot*; if _OOL_=+1 then do; x=min(x+offset_xpct,&maxpop);

y=min(y+offset_ypct,&maxrate);

if _OOL_= 0 then do; x=min(x+offset_xpct,&maxpop);

1 then do; x=min(x+offset_xpct,&maxpop); offset_ypct,&minrate);

Page 24: Funnel Plots: Visualizing Small Area Estimates - SAS Group Presentation… · Funnel Plots: Visualizing Small Area Estimates eSUG May 2010 Doug Dover Surveillance and Assessment Branch

Funnel Plots SAS annotate

*add text*; function='label'; if _OOL_=+1 then position='3'; if _OOL_=0 then position='6'; if _OOL_=‐1 then position='9'; text=&AnnoVar; size=2; hsys='3'; style="Calibri"; %if &explore ne %then %do; *add explore category to label*; text=trim(compress(text))||" "||trim(compress(&explore)); %end; %end; output;

drop offset_xpct offset_ypct; run;

text=&AnnoVar; size=2; hsys='3'; style="Calibri"; %if &explore ne %then %do; *add explore category to label*; text=trim(compress(text))||" "||trim(compress(&explore));

Page 25: Funnel Plots: Visualizing Small Area Estimates - SAS Group Presentation… · Funnel Plots: Visualizing Small Area Estimates eSUG May 2010 Doug Dover Surveillance and Assessment Branch

Funnel Plots SAS colour

*draw symbol*; function='symbol'; hsys='3'; size=2 Select(&explore); When(0) do; color="blue"; text="star"; end; When(1) do; color="red"; text="dot"; end; When(2) do; color="yellow"; text="plus"; end; When(3) do; color="green"; text="diamond"; end; When(4) do; color="orange"; text="triangle"; end; When(4) do; color="orange"; text="triangle"; end; When(5) do; color="brown"; text="#"; end; When(6) do; color="blue"; text="hash"; end; When(7) do; color="red"; text=")"; end; When(8) do; color="yellow"; text=":"; end; When(9) do; color="green"; text="'"; end; Otherwise;

end; output;

function='symbol'; hsys='3'; size=2; x=&pop; y=&rate;

) do; color="blue"; text="star"; end; ) do; color="red"; text="dot"; end; ) do; color="yellow"; text="plus"; end; ) do; color="green"; text="diamond"; end; ) do; color="orange"; text="triangle"; end; ) do; color="orange"; text="triangle"; end; ) do; color="brown"; text="#"; end; ) do; color="blue"; text="hash"; end; ) do; color="red"; text=")"; end; ) do; color="yellow"; text=":"; end; ) do; color="green"; text="'"; end;

Page 26: Funnel Plots: Visualizing Small Area Estimates - SAS Group Presentation… · Funnel Plots: Visualizing Small Area Estimates eSUG May 2010 Doug Dover Surveillance and Assessment Branch

Funnel Plots Automation! %macro funnel

( Data=, Out=FunnelOut,

Rate=, Pop=,

ABvar=, ABrate=, RatePer=100000, RatePer=100000,

CIpct=95, CIpct2=, CItrans=NORMAL, OD=1, minpop=, maxpop=, minrate=, maxrate=,

htmlfile=FunnelPlot.html, htmlpath=,

AnnoWhen=OUTSIDE, AnnoVar=,

Explore=, League=NO );

( Data=, Out=FunnelOut,

Rate=, Pop=,

ABvar=, ABrate=, RatePer=100000, RatePer=100000,

CIpct=95, CIpct2=, CItrans=NORMAL, OD=1, minpop=, maxpop=, minrate=, maxrate=,

htmlfile=FunnelPlot.html, htmlpath=,

AnnoWhen=OUTSIDE, AnnoVar=,

Explore=, League=NO );

Page 27: Funnel Plots: Visualizing Small Area Estimates - SAS Group Presentation… · Funnel Plots: Visualizing Small Area Estimates eSUG May 2010 Doug Dover Surveillance and Assessment Branch

Funnel Plots in SAS

Data + Creation + Outputs + Automation Data + Creation + Outputs + Automation

Page 28: Funnel Plots: Visualizing Small Area Estimates - SAS Group Presentation… · Funnel Plots: Visualizing Small Area Estimates eSUG May 2010 Doug Dover Surveillance and Assessment Branch

Funnel Plots Analytics

Anomaly detection Anomaly detection

Over dispersion

Page 29: Funnel Plots: Visualizing Small Area Estimates - SAS Group Presentation… · Funnel Plots: Visualizing Small Area Estimates eSUG May 2010 Doug Dover Surveillance and Assessment Branch

Funnel Plots Modeling

adjusted rate p

ˆ i

where p is the overall rate, O is the observ and E s the expected count from a Poisson i using small area data and the covariates

adjusted rate p ˆ O i adjusted rate p i E = ⋅

where p is the overall rate, O is the observed count, i and E s the expected count from a Poisson regression using small area data and the covariates of interest.

ˆ i adjusted rate p i E i = ⋅

Page 30: Funnel Plots: Visualizing Small Area Estimates - SAS Group Presentation… · Funnel Plots: Visualizing Small Area Estimates eSUG May 2010 Doug Dover Surveillance and Assessment Branch

Funnel Plots Analytics

***adjustment time***;

Proc Genmod Data=rate_data;

Model count = risk_factor_1 risk_factor_2 Model count = risk_factor_1 risk_factor_2 / dist=Poisson offset=logpop;

Output out=adj predicted=expected; run;

**and then merge back expected counts**;

***adjustment time***;

Proc Genmod Data=rate_data;

Model count = risk_factor_1 risk_factor_2 Model count = risk_factor_1 risk_factor_2 / dist=Poisson offset=logpop;

Output out=adj predicted=expected;

**and then merge back expected counts**;

Page 31: Funnel Plots: Visualizing Small Area Estimates - SAS Group Presentation… · Funnel Plots: Visualizing Small Area Estimates eSUG May 2010 Doug Dover Surveillance and Assessment Branch

Funnel Plots Modeling

unadjusted adjusted

Page 32: Funnel Plots: Visualizing Small Area Estimates - SAS Group Presentation… · Funnel Plots: Visualizing Small Area Estimates eSUG May 2010 Doug Dover Surveillance and Assessment Branch

Funnel Plots Modeling

unadjusted adjusted

Page 33: Funnel Plots: Visualizing Small Area Estimates - SAS Group Presentation… · Funnel Plots: Visualizing Small Area Estimates eSUG May 2010 Doug Dover Surveillance and Assessment Branch

Funnel Plots

•Utility in analyzing small areas

•Regression diagnostics

•SAS macro for Automation

•Proc GPlot with Annotate and Pop html output

Utility in analyzing small areas

Regression diagnostics

SAS macro for Automation

Proc GPlot with Annotate and Pop­up in

Page 34: Funnel Plots: Visualizing Small Area Estimates - SAS Group Presentation… · Funnel Plots: Visualizing Small Area Estimates eSUG May 2010 Doug Dover Surveillance and Assessment Branch

Work on Funnel Plots is part of an on­going collaboration between

Doug Dover, AHW Doug Dover, AHW

Don Schopflocher, UofA

Work on Funnel Plots is part of an going collaboration between

Doug Dover, AHW Doug Dover, AHW and

Don Schopflocher, UofA

Page 35: Funnel Plots: Visualizing Small Area Estimates - SAS Group Presentation… · Funnel Plots: Visualizing Small Area Estimates eSUG May 2010 Doug Dover Surveillance and Assessment Branch

Thank you Thank you

Page 36: Funnel Plots: Visualizing Small Area Estimates - SAS Group Presentation… · Funnel Plots: Visualizing Small Area Estimates eSUG May 2010 Doug Dover Surveillance and Assessment Branch

References:

Funnel Plot Theory “Funnel plots for comparing institutional performance” Spiegelhalter 2005 ­everything to do with funnel plots and more! ­quite accessible ­addresses many issues with use ­excellent, readable paper

“Bristol, Shipman, and Clinical Governance: Shewhart’s Forgotten Lesson” Mohammed, Cheng, Rouse, Marshall 2001 Mohammed, Cheng, Rouse, Marshall 2001 ­commentary on use of control plots ­related to funnel plots

“Defining poor and optimum performance in an IVF programme” Castilla et al 2008 ­illustrates league plots, control plots and funnel plots

“Funnel plots for comparing institutional performance”

everything to do with funnel plots and more!

addresses many issues with use

“Bristol, Shipman, and Clinical Governance: Shewhart’s Forgotten Lesson” Mohammed, Cheng, Rouse, Marshall 2001 Mohammed, Cheng, Rouse, Marshall 2001 commentary on use of control plots

“Defining poor and optimum performance in an IVF programme”

illustrates league plots, control plots and funnel plots

Page 37: Funnel Plots: Visualizing Small Area Estimates - SAS Group Presentation… · Funnel Plots: Visualizing Small Area Estimates eSUG May 2010 Doug Dover Surveillance and Assessment Branch

References:

Examples of Funnel Plots “Regional differences in population prefectures in Japan: Application of relative survival models with funnel plots” Ito et al 2009 ­excellent example of what can go wrong using funnel plots ­has large and small regions similar to Alberta ­use of funnel plots to show regional survival rates

“Using Funnel Plots to Explore Variation in Cancer Mortality across Primary Care Trusts in South Primary Care Trusts in South Davies et al 2008 ­cancer mortality rates in 76 PCTs

“An alternative approach to quantifying and addressing inequity in healthcare provision” Battersby, Flowers, Harvey 2004 ­they used control plots

Examples of Funnel Plots “Regional differences in population­based cancer survival between six prefectures in Japan: Application of relative survival models with

excellent example of what can go wrong using funnel plots has large and small regions similar to Alberta use of funnel plots to show regional survival rates

“Using Funnel Plots to Explore Variation in Cancer Mortality across Primary Care Trusts in South­East England” Primary Care Trusts in South­East England”

cancer mortality rates in 76 PCTs

“An alternative approach to quantifying and addressing inequity in

Battersby, Flowers, Harvey 2004

Page 38: Funnel Plots: Visualizing Small Area Estimates - SAS Group Presentation… · Funnel Plots: Visualizing Small Area Estimates eSUG May 2010 Doug Dover Surveillance and Assessment Branch

Author: Doug Dover Surveillance and Assessment Branch

Visualizing Small Area Estimates

Surveillance and Assessment Branch Community and Population Health Division Alberta Health & Wellness

Version History: Based substantially on the work of Doug Dover and Don Schopflocher presented at AH&W on Tuesday, April 6, 2010, in the Statistics in Surveillance Series, under the same title. “Funnel Plots as a Vehicle for Policy Relevant Analysis: Gaining Focus” Presented at ICHPS, Washington, 2009.

Funnel Plots: Visualizing Small Area Estimates

Community and Population Health Division

Based substantially on the work of Doug Dover and Don Schopflocher presented at AH&W on Tuesday, April 6, 2010, in the Statistics in Surveillance Series, under the

“Funnel Plots as a Vehicle for Policy Relevant Analysis: Gaining Focus” Presented at ICHPS, Washington, 2009.