Skip to content

Commit

Permalink
Merge pull request #91 from ukhsa-collaboration/dsr_ci_non_independent
Browse files Browse the repository at this point in the history
Dsr ci non independent
  • Loading branch information
GeorgieAnderson authored Dec 13, 2024
2 parents f419c6d + 0ce331c commit 093fd28
Show file tree
Hide file tree
Showing 47 changed files with 1,955 additions and 661 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
matrix:
config:
- {os: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
# - {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,5 @@ vignettes/*.R
inst/doc
data-raw
README.Rmd
/doc/
/Meta/
43 changes: 23 additions & 20 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Package: PHEindicatormethods
Type: Package
Version: 2.0.2
Version: 2.1.0
Title: Common Public Health Statistics and their Confidence Intervals
Description: Functions to calculate commonly used public health statistics and
their confidence intervals using methods approved for use in the production
of Public Health England indicators such as those presented via Fingertips
(<http://fingertips.phe.org.uk/>). It provides functions for the generation
(<https://fingertips.phe.org.uk/>). It provides functions for the generation
of proportions, crude rates, means, directly standardised rates, indirectly
standardised rates, standardised mortality ratios, slope and relative index
of inequality and life expectancy.
Expand All @@ -20,36 +20,39 @@ Description: Functions to calculate commonly used public health statistics and
Eayres DP, Williams ES (2004) <doi:10.1136/jech.2003.009654>.
Silcocks PBS et al (2001) <doi:10.1136/jech.55.1.38>.
Low and Low (2004) <doi:10.1093/pubmed/fdh175>.
Authors@R: c(person("Anderson", "Georgina", email = "[email protected]", role = c("aut", "cre")),
person("Fox", "Sebastian", role = c("ctb")),
person("Francis", "Matthew", role = c("ctb")),
person("Fryers", "Paul", email = "[email protected]", role = c("ctb")),
person("Clegg", "Emma", role = c("ctb")),
person("Westermann", "Annabel", email = "[email protected]", role = c("ctb")),
person("Woolner", "Joshua", role = c("ctb")),
person("Fellows", "Charlotte", email = "[email protected]", role = c("ctb"))
Fingertips Public Health Technical Guide: <https://fingertips.phe.org.uk/static-reports/public-health-technical-guidance/>.
Authors@R: c(person("Georgina", "Anderson", email = "[email protected]", role = c("aut", "cre")),
person("Sebastian", "Fox ", role = c("ctb")),
person("Matthew", "Francis ", role = c("ctb")),
person("Paul", "Fryers ", email = "[email protected]", role = c("ctb")),
person("Emma", "Clegg ", role = c("ctb")),
person("Annabel", "Westermann ", role = c("ctb")),
person("Joshua", "Woolner ", role = c("ctb")),
person("Charlotte", "Fellows ", email = "[email protected]", role = c("ctb")),
person("Olivia", "Box Power", email = "[email protected]", role = c("ctb"))
)
BugReports: https://github.com/ukhsa-collaboration/PHEindicatormethods/issues
Depends: R (>= 3.1.0)
Depends: R (>= 4.3.0)
License: GPL-3
Encoding: UTF-8
LazyData: true
Imports:
broom,
broom (>= 1.0.0),
dplyr (>= 1.1.0),
purrr (>= 1.0.0),
rlang (>= 0.4.0),
rlang (>= 1.1.0),
stats,
tibble,
tibble (>= 3.2.0),
tidyselect (>= 1.2.0),
tidyr (>= 1.3.0)
tidyr (>= 1.3.0),
lifecycle
Suggests:
knitr,
readxl,
rmarkdown,
knitr (>= 1.48),
readxl (>= 1.4.0),
rmarkdown (>= 2.28),
testthat (>= 3.0.0),
withr
withr (>= 3.0.0)
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
RoxygenNote: 7.3.2
VignetteBuilder: knitr
Config/testthat/edition: 3
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
export(assign_funnel_significance)
export(calculate_ISRate)
export(calculate_ISRatio)
export(calculate_dsr)
export(calculate_funnel_limits)
export(calculate_funnel_points)
export(phe_dsr)
Expand All @@ -14,6 +15,7 @@ export(phe_rate)
export(phe_sii)
import(broom)
import(dplyr)
importFrom(lifecycle,deprecated)
importFrom(purrr,map)
importFrom(purrr,map_chr)
importFrom(rlang,":=")
Expand Down
8 changes: 8 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## PHEindicatormethods v2.1.0
This release makes changes to the DSR function
* `calculate_dsr` function added to replace `phe_dsr`. The new calculate_dsr function has three new features:
1. Users can now specify whether events are independent. For non-independent events the data must be broken down by event frequency and the function will perform an adjustment to the confidence interval calculation.
2. The stdpoptype argument that was available in `phe_dsr` is not available in `calculate_dsr` and the user is now required to provide the standard populations as a field in the input dataframe. This is to negate the risk of incorrectly joining the standard population vector by position that was possible when using the function with stdpoptype = "vector".
3. Because of point 2 above, users can now calculate DSRs for groups containing different numbers of age bands in a single execution (for example DSRs for all age populations and DSRs for under 75s).
* `phe_dsr` has been soft deprecated - please replace all calls to this function with `calculate_dsr` before September 2025, after which date the phe_dsr function will be removed from the package. Previous calls to `phe_dsr` with stdpoptype set to "field" can be replaced directly with `calculate_dsr`, however, the stdpoptype argument has been deprectaed so will need to be removed and the stdpop argument no longer has a default so this column name will need to be provided explicitly. For previous calls to `phe_dsr` with stdpoptype = "vector", the user will need to append the standard populations to their input data frame before calling the `calculate_dsr` function and provide the stdpop argument explicitly.

## PHEindicatormethods v2.0.2
* Amended phe_quantile function so it will not produce quantiles when the number of small areas within a group is less than the number of quantiles requested. A warning will be generated when quantiles cannot be produced for this reason.
* removed the highergeog argument from phe_quantile function, previously soft-deprecated in v1.2.0.
Expand Down
Loading

0 comments on commit 093fd28

Please sign in to comment.