Skip to content

Commit

Permalink
Further changes to phe_sii documentation. Added note about references…
Browse files Browse the repository at this point in the history
… to PHE in package and function names.
  • Loading branch information
GeorgieAnderson committed Jan 23, 2024
1 parent 956b32b commit bb5dfc1
Show file tree
Hide file tree
Showing 4 changed files with 132 additions and 97 deletions.
38 changes: 21 additions & 17 deletions R/SII_function.R
Original file line number Diff line number Diff line change
Expand Up @@ -49,23 +49,25 @@
#' method.
#'
#' Use in conjunction with the \code{transform} parameter in calculation of the
#' SII: It is recommended that rates and proportions, and their confidence
#' limits, are transformed prior to calculation of the SII by setting the
#' \code{transform} parameter to TRUE for these indicator types. This will
#' perform a log transformation for rates, or logit for proportions, and return
#' outputs transformed back to the original units of the indicator. These
#' transformations are recommended to improve the linearity between the
#' indicator values and the quantile, which is an assumption of the method. A
#' user-provided standard error will not be accepted when the \code{transform]
#' parameter is set to TRUE as the confidence limits are required for this
#' transformation.
#' SII: It is recommended that rates and proportions are transformed prior to
#' calculation of the SII by setting the \code{transform} parameter to TRUE for
#' these indicator types. This will perform a log transformation for rates, or
#' logit for proportions, and return outputs transformed back to the original
#' units of the indicator. These transformations are recommended to improve the
#' linearity between the indicator values and the quantile, which is an
#' assumption of the method. A user-provided standard error will not be accepted
#' when the \code{transform} parameter is set to TRUE as the confidence limits
#' are required for this transformation.
#'
#' Use in calculation of the standard error: Rates and proportions,
#' and their confidence limits, are transformed prior to calculation of the
#' standard error. This is because it is assumed that the confidence interval
#' Use in calculation of the standard error: Rates and proportions, and their
#' confidence limits, are transformed prior to calculation of the standard error
#' for each quantile. This is because it is assumed that the confidence interval
#' around the indicator value is non-symmetric for these indicator types. Note
#' that this transformation is not controlled by the \code{transform} parameter
#' and is applied based on the value of the \code{value_type} parameter only.
#' and is applied based on the value of the \code{value_type} parameter only. A
#' user-provided standard error will not be accepted when the \code{transform}
#' parameter is set to TRUE as the confidence limits are required for this
#' transformation.
#'
#' @section Warning:
#'
Expand All @@ -92,7 +94,7 @@
#' does not need to be supplied for proportions if count and population are
#' given); unquoted string; no default
#' @param value_type indicates the indicator type (1 = rate, 2 = proportion, 0 =
#' other). The `value_type` argument is used to determine whether data should
#' other). The \code{value_type} argument is used to determine whether data should
#' be transformed prior to calculation of the standard error and/or SII. See
#' the \code{Tansformations} section for full details; integer; default 0
#' @param transform option to transform input rates or proportions prior to
Expand Down Expand Up @@ -196,10 +198,11 @@
#' decile,
#' population,
#' value_type = 1,
#' transform = TRUE,
#' value = value,
#' se = StandardError,
#' lower_cl = lowerCL,
#' upper_cl = upperCL,
#' confidence = c(0.95, 0.998),
#' transform = TRUE,
#' repetitions = 10000,
#' rii = TRUE,
#' type = "standard")
Expand All @@ -210,6 +213,7 @@
#' the inputted data.frame.
#'
#' @family PHEindicatormethods package functions
# -------------------------------------------------------------------------------------------------

phe_sii <- function(data, quantile, population, # compulsory fields
x = NULL, # optional fields
Expand Down
4 changes: 3 additions & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ knitr::opts_chunk$set(

# PHEindicatormethods

This is an R package to support analysts in the execution of statistical methods approved for use in the production of PHE indicators such as those presented via Fingertips. It provides functions for the generation of Proportions, Rates, DSRs, ISRs, Means, Life Expectancy and Slope Index of Inequality including confidence intervals for these statistics, and a function for assigning data to quantiles.
This is an R package to support analysts in the execution of statistical methods approved for use in the production of PHE indicators such as those presented via [Fingertips](https://fingertips.phe.org.uk/). It provides functions for the generation of Proportions, Rates, DSRs, ISRs, Means, Life Expectancy and Slope Index of Inequality including confidence intervals for these statistics, and a function for assigning data to quantiles.

In October 2021 Public Health England (PHE) was disbanded and as a result this package is now owned by the Department of Health and Social Care. It will continue to be supported and to prevent breaking changes there are currently no immediate plans to rename the package or its functions in light of this organisational change.

Any feedback would be appreciated and can be provided using the Issues section of the [PHEindicatormethods GitHub repository](https://github.com/ukhsa-collaboration/PHEindicatormethods).

Expand Down
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,17 @@

This is an R package to support analysts in the execution of statistical
methods approved for use in the production of PHE indicators such as
those presented via Fingertips. It provides functions for the generation
of Proportions, Rates, DSRs, ISRs, Means, Life Expectancy and Slope
Index of Inequality including confidence intervals for these statistics,
and a function for assigning data to quantiles.
those presented via [Fingertips](https://fingertips.phe.org.uk/). It
provides functions for the generation of Proportions, Rates, DSRs, ISRs,
Means, Life Expectancy and Slope Index of Inequality including
confidence intervals for these statistics, and a function for assigning
data to quantiles.

In October 2021 Public Health England (PHE) was disbanded and as a
result this package is now owned by the Department of Health and Social
Care. It will continue to be supported and to prevent breaking changes
there are currently no immediate plans to rename the package or its
functions in light of this organisational change.

Any feedback would be appreciated and can be provided using the Issues
section of the [PHEindicatormethods GitHub
Expand Down
172 changes: 97 additions & 75 deletions man/phe_sii.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit bb5dfc1

Please sign in to comment.