Skip to content

Commit e5a5e7b

Browse files
authored
Merge pull request #383 from PSIAIMS/LGT
Added the missing CI's for 2 samples in R & updated SAS/Comp pages to…
2 parents 3ac19b7 + 26dbd50 commit e5a5e7b

File tree

3 files changed

+80
-24
lines changed

3 files changed

+80
-24
lines changed

Comp/r-sas_ci_for_prop.qmd

Lines changed: 35 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -76,21 +76,41 @@ Calculating the Normal approximation and Wilson methods by hand and comparing it
7676

7777
## General Comparison Table For Two Independent Samples Proportions
7878

79-
+--------------------------------------------------------------------+--------------------------------------------------------------------+------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
80-
| Analysis of Two Independant Sample Proportions | Supported in R | Supported in SAS | Results Match |
81-
+====================================================================+====================================================================+==================+==================================================================================================================================================+
82-
| Normal approximation (Wald Method) | Yes {cardx} `ard_stats_prop_test function` uses `stats::prop.test` | Yes (default) | Yes and results match by hand calculation |
83-
| | | | |
84-
| | | | Note that documentation for stats::prop.test says it's using newcombe method. However, the results match the Normal Approximation (wald) method. |
85-
+--------------------------------------------------------------------+--------------------------------------------------------------------+------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
86-
| Normal approximation (Wald Method) with continuity correction | Yes {cardx} as per above but with correct=TRUE | Yes | Yes |
87-
| | | | |
88-
| | | | Note that documentation for stats::prop.test says it's using newcombe method. However, the results match the Normal Approximation (wald) method. |
89-
+--------------------------------------------------------------------+--------------------------------------------------------------------+------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
90-
| Wilson (Score, Altman, Newcombe) method | No | Yes | SAS results match by hand calculation |
91-
+--------------------------------------------------------------------+--------------------------------------------------------------------+------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
92-
| Wilson (Score, Altman, Newcombe) method with continuity correction | No | Yes | SAS results match by hand calculation |
93-
+--------------------------------------------------------------------+--------------------------------------------------------------------+------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
79+
+--------------------------------------------------------------------+--------------------------------------------------------------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
80+
| Analysis of Two Independant Sample Proportions | Supported in R | Supported in SAS | Results Match |
81+
+====================================================================+====================================================================+==================+===============================================================================================================================================================================================================================================+
82+
| Normal approximation (Wald Method) | Yes {DescTools} | Yes (default) | Yes and results match by hand calculation |
83+
| | | | |
84+
| | `BinomDiffCI(..,method=c("wald"))` | | **Warning** The documentation for stats::prop.test which is used in {cardx} says it's using newcombe method. However, the results match the Normal Approximation (wald) method. Hence it is reccomended to use {DescTools} instead of {cardx} |
85+
| | | | |
86+
| | Yes {cardx} `ard_stats_prop_test function` uses `stats::prop.test` | | |
87+
+--------------------------------------------------------------------+--------------------------------------------------------------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
88+
| Normal approximation (Wald Method) with continuity correction | Yes {DescTools} | Yes | Yes |
89+
| | | | |
90+
| | `BinomDiffCI(..,method=c("waldcc"))` | | **Warning** that documentation for stats::prop.test says it's using newcombe method. However, the results match the Normal Approximation (wald) method. |
91+
| | | | |
92+
| | Yes {cardx} as per above but with correct=TRUE | | |
93+
+--------------------------------------------------------------------+--------------------------------------------------------------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
94+
| Wilson (Score, Altman, Newcombe) method | Yes {DescTools} | Yes | Yes and results match by hand calculation |
95+
| | | | |
96+
| | `BinomDiffCI(..,method=c("score"))` | | |
97+
+--------------------------------------------------------------------+--------------------------------------------------------------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
98+
| Wilson (Score, Altman, Newcombe) method with continuity correction | Yes {DescTools} | Yes | Yes |
99+
| | | | |
100+
| | `BinomDiffCI(..,method=c("scorecc"))` | | |
101+
+--------------------------------------------------------------------+--------------------------------------------------------------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
102+
| Agresti-Caffo | Yes {DescTools} | Yes | Yes |
103+
| | | | |
104+
| | `BinomDiffCI(..,method=c("ac"))` | | |
105+
+--------------------------------------------------------------------+--------------------------------------------------------------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
106+
| Hauck-Anderson | Yes {DescTools} | Yes | Yes |
107+
| | | | |
108+
| | `BinomDiffCI(..,method=c("ha"))` | | |
109+
+--------------------------------------------------------------------+--------------------------------------------------------------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
110+
| Miettinen-Nurminen | Yes {DescTools} | Yes | Yes |
111+
| | | | |
112+
| | `BinomDiffCI(..,method=c("mn"))` | | |
113+
+--------------------------------------------------------------------+--------------------------------------------------------------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
94114

95115
## Prerequisites: R Packages
96116

0 commit comments

Comments
 (0)