From 3f366ab90d630eccc8ea8d108035c633bfd97e6f Mon Sep 17 00:00:00 2001
From: Pete Laud
Date: Fri, 10 Jan 2025 14:44:05 +0000
Subject: [PATCH] add more detail in the example
---
.Rprofile | 3 +++
README.Rmd | 4 ++--
ReadMe.md | 25 ++++++++++++++-----------
3 files changed, 19 insertions(+), 13 deletions(-)
diff --git a/.Rprofile b/.Rprofile
index 2e36891..9e8847c 100644
--- a/.Rprofile
+++ b/.Rprofile
@@ -1 +1,4 @@
options(repos = c(CRAN="https://cran.r-project.org"))
+if (interactive()) {
+ suppressMessages(require(devtools))
+}
diff --git a/README.Rmd b/README.Rmd
index 47a8632..87e2135 100644
--- a/README.Rmd
+++ b/README.Rmd
@@ -52,11 +52,11 @@ This builds the package from source based on the current version on [GitHub](htt
## Example
-This is a basic example which shows you how to request a confidence interval for the difference between proportions 5/56 - 0/29:
+Below is a basic example which shows you how to request a confidence interval for the difference between proportions 5/56 - 0/29. The `$call` output element shows that the default settings give an interval for the risk difference (`contrast` = "RD"), for binomial proportions (`distrib` = "bin"), at a 95% confidence level. Variance bias correction (`bcf`) and skewness correction (`skew`) are applied, continuity correction (`cc`) is not. This is the skewness-corrected asymptotic score ("SCAS") confidence interval. (For Miettinen-Nurminen, use `skew` = FALSE, for Gart-Nam, use `bcf` = FALSE.)
```{r example}
library(ratesci)
-scoreci(x1 = 5, n1 = 56, x2 = 0, n2 = 29)
+scoreci(x1 = 5, n1 = 56, x2 = 0, n2 = 29, precis = 4)
```
#### Overview
diff --git a/ReadMe.md b/ReadMe.md
index 6b5a0bd..e3bd0f6 100644
--- a/ReadMe.md
+++ b/ReadMe.md
@@ -82,27 +82,30 @@ This builds the package from source based on the current version on
## Example
-This is a basic example which shows you how to request a confidence
-interval for the difference between proportions 5/56 - 0/29:
+Below is a basic example which shows you how to request a confidence
+interval for the difference between proportions 5/56 - 0/29. The `$call`
+output element shows that the default settings give an interval for the
+risk difference (`contrast` = “RD”), for binomial proportions (`distrib`
+= “bin”), at a 95% confidence level. Variance bias correction (`bcf`)
+and skewness correction (`skew`) are applied, continuity correction
+(`cc`) is not. This is the skewness-corrected asymptotic score (“SCAS”)
+confidence interval. (For Miettinen-Nurminen, use `skew` = FALSE, for
+Gart-Nam, use `bcf` = FALSE.)
``` r
library(ratesci)
-scoreci(x1 = 5, n1 = 56, x2 = 0, n2 = 29)
+scoreci(x1 = 5, n1 = 56, x2 = 0, n2 = 29, precis = 4)
#> $estimates
-#> Lower MLE Upper level x1 n1 x2 n2 p1hat p2hat p1mle
-#> [1,] -0.018618 0.091688 0.186718 0.95 5 56 0 29 0.08928571 0 0.09168753
-#> p2mle V
-#> [1,] 0 0.001504864
+#> Lower MLE Upper level x1 n1 x2 n2 p1hat p2hat p1mle p2mle
+#> [1,] -0.0186 0.0917 0.1867 0.95 5 56 0 29 0.0893 0 0.0917 0
#>
#> $pval
#> chisq pval2sided theta0 scorenull pval_left pval_right
#> [1,] 3.024862 0.08199729 0 1.739213 0.9590014 0.04099865
#>
#> $call
-#> distrib contrast level skew simpleskew RRtang bcf
-#> "bin" "RD" "0.95" "TRUE" "FALSE" "FALSE" "TRUE"
-#> cc random
-#> "FALSE" "FALSE"
+#> distrib contrast level bcf skew cc
+#> "bin" "RD" "0.95" "TRUE" "TRUE" "FALSE"
```
#### Overview