CI {pgirmess} | R Documentation |
Provides a n x 2 matrix with the lower limit (column 1) and upper limit (column 2) of the 95 percent confidence interval of percentages
CI(x, y, totrials = FALSE)
x |
a vector with the number of positive observations |
y |
a vector of the same length as x with the number of negative observations, or of the total number of observations |
totrials |
if false (the default) y is the number of negative observations; if true, y is the total number of observations |
Wrapper of prop.test().
A matrix of length(x) rows and 2 columns. Column 1: lower limit; column 2: upper limit of the 95 percent confidence interval
Patrick Giraudoux <pgiraudo@univ-fcomte.fr
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(x,y) x<-c(2,10,7,8,7) # eg: number of positive cases y<-c(4,11,7,16,10)# eg: total number of cases CI(x,y,totrials=TRUE)