Closed-form function for computing confidence intervals for a single rate.
Note: For associated hypothesis tests, use scoreci()
with contrast = "p"
.
This function is vectorised in x, n.
scaspci(
x,
n,
distrib = "bin",
level = 0.95,
bcf = FALSE,
bign = n,
xihat = 1,
cc = FALSE,
...
)
A list containing the following components:
a matrix containing estimated rate(s), the SCAS confidence interval, and the input values x and n.
details of the function call.
Numeric vector of number of events.
Numeric vector of sample sizes (for binomial rates) or exposure times (for Poisson rates).
Character string indicating distribution assumed for the input
data:
"bin" = binomial (default);
"poi" = Poisson.
Number specifying confidence level (between 0 and 1, default 0.95).
Logical (default TRUE) indicating whether to apply bias correction
in the score denominator. Applicable to distrib = "bin"
only.
Sample size N to be used in the calculation of bcf, if different
from n. (Used by transformed SCASp method for paired conditional OR in
pairbinci()
.)
Number specifying estimated variance inflation factor for a
skewness corrected version of the Saha Wilson Score interval for clustered
binomial proportions. Need to calculate using BMS and WMS as per Saha 2016.
Used by clusterpci()
function for data entered per cluster.
Number or logical (default FALSE) specifying (amount of) continuity adjustment. Numeric value is taken as the gamma parameter in Laud 2017, Appendix S2 (default 0.5 for 'conventional' adjustment if cc = TRUE).
Other arguments.
Pete Laud, p.j.laud@sheffield.ac.uk
Laud PJ. Equal-tailed confidence intervals for comparison of rates. Pharmaceutical Statistics 2017; 16:334-348. (Appendix A.4)