ratesci-package | R Documentation |
Computes confidence intervals for the rate (or risk) difference ('RD') or rate ratio (or relative risk, 'RR') for binomial proportions or Poisson rates, or for odds ratio ('OR', binomial only). Also confidence intervals for a single binomial or Poisson rate, and intervals for matched pairs. Includes skewness-corrected asymptotic score ('SCAS') methods, which have been developed in Laud (2017) \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1002/pst.1813")} from Miettinen & Nurminen (1985) \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1002/sim.4780040211")} and Gart & Nam (1988) \Sexpr[results=rd]{tools:::Rd_expr_doi("10.2307/2531848")}. The same score produces hypothesis tests analogous to the test for binomial RD and RR by Farrington & Manning (1990) \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1002/sim.4780091208")}, or the McNemar test for paired data. The package also includes MOVER methods (Method Of Variance Estimates Recovery) for all contrasts, derived from the Newcombe method but with options to use equal-tailed intervals in place of the Wilson score method, and generalised for Bayesian applications incorporating prior information. So-called 'exact' methods for strictly conservative coverage are approximated using continuity corrections, and the amount of correction can be selected to avoid over-conservative coverage. Also includes methods for stratified calculations (e.g. meta-analysis), either assuming fixed effects (matching the CMH test) or incorporating stratum heterogeneity.
scoreci: for score-based confidence intervals
scasci: wrapper function to compute SCAS interval
tdasci: wrapper function to compute TDAS random effects stratified interval
moverci: for the MOVER method
moverbci: wrapper function to compute MOVER-B interval
jeffreysci: wrapper function to compute Jeffreys interval for a single rate
scaspci: non-iterative SCAS method for a single rate
rateci: wrapper function for SCAS, Jeffreys or 'exact' methods for a single rate
pairbinci: for paired binomial data (includes asymptotic score and MOVER options)
Maintainer: Pete Laud p.j.laud@sheffield.ac.uk (ORCID)
Laud PJ. Equal-tailed confidence intervals for comparison of rates. Pharmaceutical Statistics 2017; 16:334-348.
Laud PJ. Corrigendum: Equal-tailed confidence intervals for comparison of rates. Pharmaceutical Statistics 2018; 17:290-293.
Tang Y. Score confidence intervals and sample sizes for stratified comparisons of binomial proportions. Statistics in Medicine 2020; 39:3427–3457.
Tang Y. Comments on “Equal-tailed confidence intervals for comparison of rates”. Pharmaceutical Statistics 2021; online ahead of print.
Laud PJ. Author's reply to the letter to the editor by Yongqiang Tang: Comments on “Equal-tailed confidence intervals for comparison of rates”. Pharmaceutical Statistics 2021; online ahead of print.
Miettinen OS, Nurminen M. Comparative analysis of two rates. Statistics in Medicine 1985; 4:213-226.
Gart JJ. Analysis of the common odds ratio: corrections for bias and skewness. Bulletin of the International Statistical Institute 1985, 45th session, book 1, 175-176.
Gart JJ, Nam JM. Approximate interval estimation of the ratio of binomial parameters: A review and corrections for skewness. Biometrics 1988; 44(2):323-338.
Gart JJ, Nam JM. Approximate interval estimation of the difference in binomial parameters: correction for skewness and extension to multiple tables. Biometrics 1990; 46(3):637-643.
Farrington CP, Manning G. Test statistics and sample size formulae for comparative binomial trials with null hypothesis of non-zero risk difference or non-unity relative risk. Statistics in Medicine 1990; 9(12):1447–1454.
Newcombe RG. Interval estimation for the difference between independent proportions: comparison of eleven methods. Statistics in Medicine 1998; 17(8):873-890.
Donner A, Zou G. Closed-form confidence intervals for functions of the normal mean and standard deviation. Statistical Methods in Medical Research 2012; 21(4):347-359.
Useful links:
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.