Description Usage Arguments Value References Examples
Confidence functions for the odds ratio between two binomial proportions based on the mid P-value for the exact test.
1 | oddsratio.conf(x, n, plot = TRUE, conf.level = 0.95, log = "")
|
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 odds ratio on log-scale |
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.
Tore Schweder and Nils Lid Hjort. Confidence, likelihood, probability. Vol. 41. Cambridge University Press, 2016.
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)
oddsratio.conf(x, n)
oddsratio.conf(x, n, log = 'x') # Show odds ratio with
# log-scaling of horizontal axis.
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.