# Example R packages required
library(cardx)
library(ratesci)R vs SAS Confidence Intervals for a Proportion
Introduction
See the summary page for general introductory information on confidence intervals for proportions, including the principles underlying the most common methods.
For more technical derivation of methods for a single proportion, see the corresponding SAS page.
The tables below provide an overview of findings from R & SAS, for calculation of CIs for a Single Sample Proportion.
General Comparison Table For Single Sample Proportions
See the corresponding SAS page and R page for results showing a single set of data which has been run through both SAS and R.
| Analysis of One Sample Proportion | Supported in R | Supported in SAS | Results Match |
|---|---|---|---|
| Normal approximation (Wald Method) | Yes {cardx} / {ratesci} | Yes (default) | Yes |
| Wilson (Score) method | Yes {cardx} / {ratesci} | Yes | Yes |
| Skewness-Corrected Asymptotic Score (SCAS) method | Yes {ratesci} | No | NA |
| Agresti-Coull | Yes {cardx} / {ratesci} | Yes | Yes |
| Jeffreys Bayesian ‘equal-tailed’ | Yes {cardx} / {ratesci} | Yes | Yes |
| mid-P | Yes {ratesci} | Yes | Yes |
| Wilson Stratified score | Yes {cardx} / {ratesci} | No | NA |
| ‘exact’ and continuity adjusted methods: | |||
| Clopper-Pearson ‘Exact’ | Yes {cardx} / {ratesci} | Yes (default) | Yes |
| Blaker ‘exact’ | Yes {ratesci} | Yes | Yes |
| Normal approximation (Wald Method) with continuity adjustment | Yes {cardx} / {ratesci} | Yes | Yes |
| Wilson (Score) method with continuity adjustment | Yes {cardx} / {ratesci} | Yes | Yes |
| SCAS method with continuity adjustment | Yes {ratesci} | No | NA |
Prerequisites: R Packages
See the R page for more detail.