riskratio.conf: Confidence Functions for the Relative Risk Between Two...

Description Usage Arguments Value References Examples

View source: R/prop.R

Description

Confidence functions for the relative risk between two binomial proportions based on the score statistic.

Usage

1
riskratio.conf(x, n, plot = TRUE, conf.level = 0.95, log = "")

Arguments

x

a vector of counts of successes in each independent sample

n

a vector of the number of trials in each independent sample

plot

whether to plot the confidence density and curve

conf.level

the confidence level for the confidence interval indicated on the confidence curve

log

'x' to plot risk ratio on log-scale

Value

A list containing the confidence functions pconf, dconf, cconf, and qconf for the relative risk between two proportions, as well as the P-curve and S-curve.

References

Olli Miettinen and Markku Nurminen. "Comparative analysis of two rates." Statistics in Medicine 4.2 (1985): 213-226.

Markku Nurminen. "Confidence intervals for the difference and ratio of two binomial proportions." Biometrics 42 (1986): 675-676.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# From Physician's Health Study, on whether regular
# intake of aspirin reduces the rate of heart disease.
#
# Data:
#
#         | Yes |   No  | Total
# -----------------------------
# Placebo | 189 | 10845 | 11034
# Aspirin | 104 | 10933 | 11037

x <- c(189, 104)
n <- c(11034, 11037)

riskratio.conf(x, n)

riskratio.conf(x, n, log = 'x') # Show risk ratio with
                                 # log-scaling of horizontal axis.

ddarmon/clp documentation built on Jan. 25, 2021, 6:22 p.m.