prop.conf: Confidence Functions for One or Two Proportions

Description Usage Arguments Value References Examples

View source: R/prop.R

Description

Confidence functions for a single binomial proportion based on the mid P-value or the difference of two independent proportions based on the score test statistic.

Usage

1
prop.conf(x, n, plot = TRUE, conf.level = 0.95)

Arguments

x

the number of successes out of n trials (one proportion) or a vector with the number of successes in two independent samples (two proportions).

n

the number of trials (one proportion) or a vector with the number of trials in two independent samples (two proportions)

plot

whether to plot the confidence density and curve

conf.level

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

Value

A list containing the confidence functions pconf, dconf, cconf, and qconf for a single proportion or the difference of two proportions, as well as the P-curve and S-curve.

References

Tore Schweder and Nils Lid Hjort. Confidence, likelihood, probability. Vol. 41. Cambridge University Press, 2016.

Jan Hannig. "On generalized fiducial inference." Statistica Sinica (2009): 491-544.

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
# One proportion
 prop.conf(x = 0, n = 10)

# Two proportions
 prop.conf(x = c(1, 2), n = c(10, 20))

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