CI | R Documentation |
Computes the lower limit and upper limit of the 95 percent confidence interval of percentage estimates
CI(x, ...)
x |
a two-dimensional table, matrix or data.frame with 2 columns, giving the counts of successes and failures, respectively |
... |
other arguments to pass to |
Simple wrapper of prop.test
. The default confidence interval is 95 percent, but can be modified passing values to prop.test
by the conf.level
argument.
A 3 column matrix.
Column 1: percentage estimate
Column 2: lower limit of the confidence interval
column 3: upper limit of the confidence interval
prop.test
x<-c(2,10,7,8,7) # eg: number of positive cases
y<-c(56,22,7,20,5)# eg: number of negative cases
CI(cbind(x,y))
CI(cbind(x,y), conf.level=0.99)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.