PHEindicatormethods (version 1.4.2)

byars_lower: byars_lower

Description

Calculates the lower confidence limits for observed numbers of events using Byar's method (1).

Usage

byars_lower(x, confidence = 0.95)

Value

Returns lower confidence limits for observed numbers of events using Byar's method (1)

Arguments

x

the observed numbers of events; numeric vector; no default

confidence

the required level of confidence expressed as a number between 0.9 and 1 or a number between 90 and 100 or can be a vector of 0.95 and 0.998, for example, to output both 95 percent and 99.8 percent percent CIs; numeric; default 0.95

Notes

This is an internal package function that is appropriately called by exported 'phe_' prefixed functions within the PHEindicatormethods package.

byars_lower and byars_upper together return symmetric confidence intervals around counts, therefore for a specified confidence level, \(\alpha\), the probability that, by chance, the lower limit returned will be above the true underlying value, is \(\alpha\)/2. If the confidence level is very close to 1 or the number of events is very small Byar's method is inaccurate and may return a negative number - in these cases an error is returned.

References

(1) Breslow NE, Day NE. Statistical methods in cancer research, volume II: The design and analysis of cohort studies. Lyon: International Agency for Research on Cancer, World Health Organisation; 1987.