Skip to content

Commit 9d679ba

Browse files
committed
recommended cran fixes
1 parent cf622b5 commit 9d679ba

6 files changed

Lines changed: 37 additions & 33 deletions

File tree

R/funnel_plot.R

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#' @title Funnel plots for comparing institutional performance
2-
#' @description An implementation of funnel plots for indirectly standardised ratios, as described by Spiegelhalter (2005) <https://doi.org/10.1002/sim.1970>.
2+
#' @description An implementation of funnel plots for indirectly standardised ratios, as described by Spiegelhalter (2005) <https://doi.org/10.1002/sim.1970/>.
33
#' There are several parameters for the input, with the assumption that you will want smooth,
44
#' overdispersed, funnel control limits. Limits may be inflated for overdispersion based on the methods of DerSimonian & Laird (1986), buy calculating a between unit standard deviation (\eqn{\tau})
55
#' and constructing an additive random effects models, originally used for meta-analyses of clinical trials data.
@@ -68,10 +68,10 @@
6868
#' The plot colours deliberately avoid red-amber-green colouring, but you could extract this from the ggplot object and change manually if you like.
6969
#' Future versions of `funnelplotr` may allow users to change this.
7070
#'
71-
#' @references DerSimonian & Laird (1986) <doi:10.1016/0197-2456(86)90046-2> Meta-analysis in clinical trials.
72-
#' @references Spiegelhalter (2005) <doi:10.1002/sim.1970> Funnel plots for comparing institutional performance
73-
#' @references Spiegelhalter et al. (2012) <doi:10.1111/j.1467-985X.2011.01010.x> Statistical methods for healthcare regulation: rating, screening and surveillance: <doi:10.1111/j.1467-985X.2011.01010.x>
74-
#' @references NHS Digital (2020) SHMI Methodology v .134\url{https://digital.nhs.uk/data-and-information/publications/clinical-indicators/shmi/current}
71+
#' @references DerSimonian & Laird (1986) Meta-analysis in clinical trials. \url{https://doi.org/10.1016/0197-2456(86)90046-2/}
72+
#' @references Spiegelhalter (2005) Funnel plots for comparing institutional performance \url{(https://doi.org/10.1002/sim.1970}
73+
#' @references Spiegelhalter et al. (2012) Statistical methods for healthcare regulation: rating, screening and surveillance: \url{https://doi.org/10.1111/j.1467-985X.2011.01010.x}
74+
#' @references NHS Digital (2020) SHMI Methodology v .134 \url{https://digital.nhs.uk/data-and-information/publications/clinical-indicators/shmi/current/}
7575
#'
7676
#' @examples
7777
#' # We will use the 'medpar' dataset from the 'COUNT' package.

README.Rmd

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,25 +24,25 @@ knitr::opts_chunk$set(
2424
# Funnel Plots for Comparing Institutional Performance <img src="man/figures/logo.png" width="160px" align="right" />
2525

2626
<!-- badges: start -->
27-
[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
27+
[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active/)
2828
[![CRAN version](http://www.r-pkg.org/badges/version/FunnelPlotR)](https://cran.r-project.org/package=FunnelPlotR)
29-
![](http://cranlogs.r-pkg.org/badges/grand-total/FunnelPlotR)
30-
[![Codecov test coverage](https://codecov.io/gh/nhs-r-community/FunnelPlotR/branch/main/graph/badge.svg)](https://codecov.io/gh/nhs-r-community/FunnelPlotR?branch=main)
31-
[![R-CMD-check](https://github.com/nhs-r-community/FunnelPlotR/workflows/R-CMD-check/badge.svg)](https://github.com/nhs-r-community/FunnelPlotR/actions)
29+
![](http://cranlogs.r-pkg.org/badges/grand-total/FunnelPlotR/)
30+
[![Codecov test coverage](https://codecov.io/gh/nhs-r-community/FunnelPlotR/branch/main/graph/badge.svg)](https://codecov.io/gh/nhs-r-community/FunnelPlotR?branch=main/)
31+
[![R-CMD-check](https://github.com/nhs-r-community/FunnelPlotR/workflows/R-CMD-check/badge.svg)](https://github.com/nhs-r-community/FunnelPlotR/actions/)
3232
<!-- badges: end -->
3333

3434
## Funnel Plots
3535
__This package is the newer version of the older `CMFunnels` package. Development work will focus on this package from now on.__
3636

3737
This is an implementation of the funnel plot processes, and overdispersion methods described in:<br>
38-
[Statistical methods for healthcare regulation: rating, screening and surveillance. Spiegelhalter et al (2012)](https://rss.onlinelibrary.wiley.com/doi/full/10.1111/j.1467-985X.2011.01010.x)<br>
39-
[Funnel plots for comparing institutional performance. Spiegelhalter (2005)](https://onlinelibrary.wiley.com/doi/10.1002/sim.1970)<br>
40-
[Handling over-dispersion of performance indicators. Spiegelhalter (2005)](https://qualitysafety.bmj.com/content/14/5/347)<br>
38+
[Statistical methods for healthcare regulation: rating, screening and surveillance. Spiegelhalter et al (2012)](https://doi.org/10.1111/j.1467-985X.2011.01010.x)<br>
39+
[Funnel plots for comparing institutional performance. Spiegelhalter (2005)](https://doi.org/10.1002/sim.1970)<br>
40+
[Handling over-dispersion of performance indicators. Spiegelhalter (2005)](https://dx.doi.org/10.1136/qshc.2005.013755)<br>
4141

4242
It draws funnel plots using `ggplot2` and allows users to specify whether they want to adjust the funnel plot limits for 'overdispersion.' This adjustment makes the assumption that we are dealing with clusters of values (means) at institutions that are themselves arranged around a global mean. We then have 'within' institution variation and 'between institution' variation. The process assessed the expected variance in our data, and where it is greater than that expected by the Poisson distribution, uses the difference as a scaling factor. It is then used in an additive fashion, after an adjustment for outliers by either Winsorised or truncated (with a default 10% at each end of the distribution.)
4343

4444
Methods are based on those presented in Spiegelhalter's papers and the Care Quality Commission's Intelligent Monitoring methodology documents, with methods for proportions, ratios of counts and indirectly standardised ratios. There is a also a variant method for standardised ratios, used in the NHS' Summary Hospital Mortality Indicator'<br>
45-
[Summary Hospital-level Mortality Indicator, NHS Digital, SHMI specification](https://digital.nhs.uk/data-and-information/publications/ci-hub/summary-hospital-level-mortality-indicator-shmi) <br>
45+
[Summary Hospital-level Mortality Indicator, NHS Digital, SHMI specification](https://digital.nhs.uk/data-and-information/publications/ci-hub/summary-hospital-level-mortality-indicator-shmi/) <br>
4646

4747
This variant uses a log-transformation and truncation of the distribution for calculating overdispersion, whereas Spiegelhalter's methods use a square-root and Winsorisation.
4848

@@ -134,4 +134,4 @@ These methods can be used for any similar indicators, e.g. standardised mortalit
134134

135135
Please read the package documentation for more info, at: https://nhs-r-community.github.io/FunnelPlotR/
136136

137-
Funnel Plot HEX sticker/logo by Paul Chipperfield, check him out at: https://themightychip.com/
137+
Funnel Plot HEX sticker/logo by Paul Chipperfield

README.md

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55

66
[![Project Status: Active – The project has reached a stable, usable
77
state and is being actively
8-
developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
8+
developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active/)
99
[![CRAN
1010
version](http://www.r-pkg.org/badges/version/FunnelPlotR)](https://cran.r-project.org/package=FunnelPlotR)
11-
![](http://cranlogs.r-pkg.org/badges/grand-total/FunnelPlotR) [![Codecov
12-
test
13-
coverage](https://codecov.io/gh/nhs-r-community/FunnelPlotR/branch/main/graph/badge.svg)](https://codecov.io/gh/nhs-r-community/FunnelPlotR?branch=main)
14-
[![R-CMD-check](https://github.com/nhs-r-community/FunnelPlotR/workflows/R-CMD-check/badge.svg)](https://github.com/nhs-r-community/FunnelPlotR/actions)
11+
![](http://cranlogs.r-pkg.org/badges/grand-total/FunnelPlotR/)
12+
[![Codecov test
13+
coverage](https://codecov.io/gh/nhs-r-community/FunnelPlotR/branch/main/graph/badge.svg)](https://codecov.io/gh/nhs-r-community/FunnelPlotR?branch=main/)
14+
[![R-CMD-check](https://github.com/nhs-r-community/FunnelPlotR/workflows/R-CMD-check/badge.svg)](https://github.com/nhs-r-community/FunnelPlotR/actions/)
1515
<!-- badges: end -->
1616

1717
## Funnel Plots
@@ -22,12 +22,11 @@ Development work will focus on this package from now on.**
2222
This is an implementation of the funnel plot processes, and
2323
overdispersion methods described in:<br> [Statistical methods for
2424
healthcare regulation: rating, screening and surveillance. Spiegelhalter
25-
et al
26-
(2012)](https://rss.onlinelibrary.wiley.com/doi/full/10.1111/j.1467-985X.2011.01010.x)<br>
25+
et al (2012)](https://doi.org/10.1111/j.1467-985X.2011.01010.x)<br>
2726
[Funnel plots for comparing institutional performance. Spiegelhalter
28-
(2005)](https://onlinelibrary.wiley.com/doi/10.1002/sim.1970)<br>
29-
[Handling over-dispersion of performance indicators. Spiegelhalter
30-
(2005)](https://qualitysafety.bmj.com/content/14/5/347)<br>
27+
(2005)](https://doi.org/10.1002/sim.1970)<br> [Handling over-dispersion
28+
of performance indicators. Spiegelhalter
29+
(2005)](https://dx.doi.org/10.1136/qshc.2005.013755)<br>
3130

3231
It draws funnel plots using `ggplot2` and allows users to specify
3332
whether they want to adjust the funnel plot limits for ‘overdispersion.’
@@ -47,7 +46,7 @@ with methods for proportions, ratios of counts and indirectly
4746
standardised ratios. There is a also a variant method for standardised
4847
ratios, used in the NHS’ Summary Hospital Mortality Indicator’<br>
4948
[Summary Hospital-level Mortality Indicator, NHS Digital, SHMI
50-
specification](https://digital.nhs.uk/data-and-information/publications/ci-hub/summary-hospital-level-mortality-indicator-shmi)
49+
specification](https://digital.nhs.uk/data-and-information/publications/ci-hub/summary-hospital-level-mortality-indicator-shmi/)
5150
<br>
5251

5352
This variant uses a log-transformation and truncation of the
@@ -188,5 +187,4 @@ e.g. standardised mortality ratios, readmissions etc.
188187
Please read the package documentation for more info, at:
189188
<https://nhs-r-community.github.io/FunnelPlotR/>
190189

191-
Funnel Plot HEX sticker/logo by Paul Chipperfield, check him out at:
192-
<https://themightychip.com/>
190+
Funnel Plot HEX sticker/logo by Paul Chipperfield

cran-comments.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
## Release summary
2+
3+
### Resubmission - 01/06/2023
4+
I have updated some of the URLS to the most current DOI for for references, made links all https, included trailing slashes where they resolve. All other links tested and current.
5+
6+
7+
28
This is a bug-fix release for the FunnelPlotR package:
39
* an error handling function was not performing correctly and preventing multiple selections.
410
* A logic step for dealing OD adjustment if there is no OD.

man/funnel_plot.Rd

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vignettes/funnel_plots.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ knitr::opts_chunk$set(
2727

2828
Funnel plots are a common tool for comparing organisations or units using proportions or standardised rates. A common use of them is for monitoring mortality at hospitals. This is an introductory post on the subject, that gives a little information about them and how they are constructed. It is deliberately light on theory, focusing on use, some of the theory is referenced for interested readers.
2929

30-
This post also uses a funnel plot function, for indirectly standardised ratios, that I built as part of my PhD work. The function is based on `ggplot2` [@wickhamGgplot2ElegantGraphics2009], and is available at https://github.com/chrismainey/FunnelPlotR, although it's a work in progress.
30+
This post also uses a funnel plot function, for indirectly standardised ratios, that I built as part of my PhD work. The function is based on `ggplot2` [@wickhamGgplot2ElegantGraphics2009], and is available at https://github.com/chrismainey/FunnelPlotR/, although it's a work in progress.
3131

3232
There are different kinds of funnel plot, but this post focuses on the type used to compare standardised mortality and other similarly constructed indicators .
3333

0 commit comments

Comments
 (0)