Description Usage Arguments Details Value Examples
View source: R/proportion.CI.R
proportion.CI
provides a pointwise estimation and a confidence interval for a population proportion.
1 | proportion.CI(x, n, conf.level)
|
x |
a single numeric value corresponding with either the proportion estimate or the number of successes of the sample. |
n |
a single positive integer corresponding with the sample size. |
conf.level |
a single numeric value corresponding with the confidence level of the interval; must be a value in (0,1). |
Counts of successes and failures must be nonnegative and hence not greater than the corresponding numbers of trials which must be positive. All finite counts should be integers.
If the number of successes are given, then the proportion estimate is computed.
A list containing the following components:
estimate |
numeric value corresponding with the sample proportion estimate. |
CI |
a numeric vector of length two containing the lower and upper bounds of the confidence interval. |
Independently on the user saving those values, the function provides a summary of the result on the console.
1 2 3 4 5 | #Given the sample proportion estimate
proportion.CI(0.3, 100, conf.level=0.95)
#Given the number of successes
proportion.CI(30,100,conf.level=0.95)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.