.- help for ^propci^ [STB-52: sg119] .- Confidence intervals for binomial proportions --------------------------------------------- ^propci^ [weight] [^if^ exp] [^in^ range] , ^c^ond^(^cond^)^ [^l^evel^(^#^)^ ^none^ ^all^ ^ar^csin ^ew^ald ^ex^act ^wa^ld ^wi^lson ] ^propci ?^ ^fweights^ are allowed; see help @weights@. Description ----------- ^propci^ computes the proportion of cases in which a Boolean condition (^cond^) is true, and presents an associated confidence interval using zero or more of five different methods. The condition cond is used to define a temporary indicator variable and the @tabulate@ command is then applied to calculate the proportion. The second syntax above displays a brief reminder of the first syntax. Options ------- ^cond(cond)^ provides a Boolean (true-false) expression that defines the propor- tion of interest (say, p = x/n). ^[^Not optional.^]^ ^level(#)^ specifies the desired confidence level. May be fractional and may be specified as a percentage (97.5) or a proportion (.9633). ^all, none^ choose among the following confidence intervals in the obvious way. ^arcsin^ produces an endpoint-adjusted, enhanced version of the classic arcsine transform-based interval. ^ewald^ gives an endpoint-adjusted, enhanced version of the classic normal theory (^Wald^) interval; see ^wald^, below. ^exact^ computes the Clopper-Pearson so-called "exact" confidence interval, the method used by the @ci@ and @cii@ commands. (This is the default.) ^wald^ requests the classic normal theory interval, p +/- z*sqrt(p(1-p)/n), named for its connection with the Wald test; the limits here are endpoint-adjust- ed, as are those for all other methods. (^ewald^ gives an "enhanced" version of the ^wald^ interval.) ^wilson^ yields an endpoint-adjusted interval that replaces the observed propor- tion, p = x/n, with Wilson's estimator, (x+2)/(n+4). Notes ----- In all cases above, "enhanced" means that the proportion p = x/n is judiciously biased toward 1/2, so as to improve the minimum coverage probability of the re- sulting interval. For details of the enhanced arcsine (^arcsin^) and enhanced Wald (^ewald^) intervals, as well as the details of "endpoint-adjustment," see: Gleason, J. R. (1999). Better approximations are even better for interval estimation of binomial proportions. Submitted for publication. For details of the ^wilson^ confidence interval, see: Agresti, A. and Coull, B. A. (1998). Approximate is better than "exact" for interval estimation of binomial proportions. ^The American Statistician^, 52, 119-126. Examples -------- . ^propci if !missing(sex), cond(upper(sex) == "M") lev(.975) ew ar^ . ^propci if upper(sex) == "M", c((bodywt>200) & (bodywt!=.)) all lev(99)^ . ^propci, c( (age > 60)|(age < 20) ) exact ewald^ . ^propci, c( (age > 60) & (wt/ht > 2.5) ) arcsin^ Author ------ John R. Gleason, Syracuse University, Syracuse NY, USA (loesljrg@@accucom.net) [This is Version 1.0.1 (10Sep1999).] Also see -------- Manual: ^[R] ci^ ^[R] tabulate^ On-line: help for @bitest@, @ci@, @tabulate@, @propcii@