README.md

funnelplot

Travis build
status codecov

The goal of funnelplot is to simplify risk adjusted comparisons of institutional (cluster) performance for the purpose of outlier discovery.

Installation

You can install the development version of funnelplot from GitHub with:

# install.packages("devtools")
devtools::install_github("oizin/funnelplot")

Example

This is a basic example which shows you how to produce a risk adjusted funnel plot with 95% and 99% control limits:

library(funnelplot)
data("example_data")

# outcome ~ covariates | cluster ID
f1 <- funnelModel(test ~ age + gender | hosp_id, pointTarget(limits = c(0.05,0.01)), data = example_data)
plot(f1) +
  theme_funnel()

funnelplot supports:

All objects returned by funnelplot::plot() are ggplot2 objects enabling further customisation:

library(ggplot2)
#> Warning: package 'ggplot2' was built under R version 3.5.2
plot(f1) +
  labs(x = "Number of patients", y = "Performed test (%)", title = "Hospital performance (2018)", 
       subtitle = "Adjusted for patient age and gender") +
  scale_y_continuous(breaks = seq(0.2,0.6,0.2),labels = 100*seq(0.2,0.6,0.2)) +
  scale_color_discrete(name = "Control limit", labels = c(0.95,0.99)) +
  theme_grey()

See the vignettes:

# vignettes
vignette("funnelplot-intro")

References

Benjamini, Y., & Hochberg, Y. (1995). Controlling the false discovery rate: a practical and powerful approach to multiple testing. Journal of the royal statistical society. Series B (Methodological), 289-300.

Jones, H. E., Ohlssen, D. I., & Spiegelhalter, D. J. (2008). Use of the false discovery rate when comparing multiple health care providers. Journal of clinical epidemiology, 61(3), 232-240.

Spiegelhalter, D. J. (2005). Funnel plots for comparing institutional performance. Statistics in medicine, 24(8), 1185-1202.



oizin/funnelplot documentation built on March 11, 2021, 2:58 p.m.