Skip to content

Commit

Permalink
Fixed spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
wleoncio committed Mar 14, 2024
1 parent 55725ed commit ecbbd51
Show file tree
Hide file tree
Showing 12 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion R/MiettinenNurminen_asymptotic_score_CI_OR_2x2.R
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ MiettinenNurminen_asymptotic_score_CI_OR_2x2 <- function(n, alpha = 0.05) {
contingencytables_result(
list("lower" = L, "upper" = U, "estimate" = estimate),
sprintf(
"Mietinen-Nurminen asymptotic score CI: estimate = %6.4f (%g%% CI %6.4f to %6.4f)",
"Miettinen-Nurminen asymptotic score CI: estimate = %6.4f (%g%% CI %6.4f to %6.4f)",
estimate, 100 * (1 - alpha), L, U
)
)
Expand Down
6 changes: 3 additions & 3 deletions R/MiettinenNurminen_asymptotic_score_CI_difference_2x2.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#' @title The Mietinen-Nurminen asymptotic score confidence interval for the
#' @description The Mietinen-Nurminen asymptotic score confidence interval for the
#' @title The Miettinen-Nurminen asymptotic score confidence interval for the
#' @description The Miettinen-Nurminen asymptotic score confidence interval for the
#' @description difference between probabilities
#' @description Described in Chapter 4 "The 2x2 Table"
#' @param n the observed counts (a 2x2 matrix)
Expand Down Expand Up @@ -56,7 +56,7 @@ MiettinenNurminen_asymptotic_score_CI_difference_2x2 <- function(n, alpha = 0.05
contingencytables_result(
list("lower" = L, "upper" = U, "estimate" = estimate),
sprintf(
"Mietinen-Nurminen asymptotic score CI: estimate = %6.4f (%g%% CI %6.4f to %6.4f)",
"Miettinen-Nurminen asymptotic score CI: estimate = %6.4f (%g%% CI %6.4f to %6.4f)",
estimate, 100 * (1 - alpha), L, U
)
)
Expand Down
2 changes: 1 addition & 1 deletion R/MiettinenNurminen_asymptotic_score_CI_ratio_2x2.R
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ MiettinenNurminen_asymptotic_score_CI_ratio_2x2 <- function(n, alpha = 0.05) {
contingencytables_result(
list("lower" = L, "upper" = U, "estimate" = estimate),
sprintf(
"Mietinen-Nurminen asymptotic score CI: estimate = %6.4f (%g%% CI %6.4f to %6.4f)",
"Miettinen-Nurminen asymptotic score CI: estimate = %6.4f (%g%% CI %6.4f to %6.4f)",
estimate, 100 * (1 - alpha), L, U
)
)
Expand Down
4 changes: 2 additions & 2 deletions R/Scheffe_type_CIs_paired_cxc.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#' @title ScheffE-type confidence intervals for differences of marginal probabilities
#' @description ScheffE-type confidence intervals for differences of marginal probabilities
#' @title Scheffe-type confidence intervals for differences of marginal probabilities
#' @description Scheffe-type confidence intervals for differences of marginal probabilities
#' @description Described in Chapter 9 "The Paired kxk Table"
#' @param n the observed table (a cxc matrix)
#' @param alpha the nominal level, e.g. 0.05 for 95% CIs
Expand Down
6 changes: 3 additions & 3 deletions R/Scheffe_type_CIs_rxc.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#' @title The ScheffE-type simultaneous confidence intervals for the differences pi_1|i - pi_1|j
#' @description The ScheffE-type simultaneous confidence intervals for the differences pi_1|i - pi_1|j
#' @title The Scheffe-type simultaneous confidence intervals for the differences pi_1|i - pi_1|j
#' @description The Scheffe-type simultaneous confidence intervals for the differences pi_1|i - pi_1|j
#' @description Described in Chapter 7 "The rxc Table"
#' @param n the observed counts (an rx2 vector)
#' @param alpha the nominal level, e.g. 0.05 for 95# CIs
Expand Down Expand Up @@ -27,7 +27,7 @@ Scheffe_type_CIs_rxc <- function(n, alpha = 0.05) {
}
}

# Simultaneous confidence intervals with ScheffE adjustment
# Simultaneous confidence intervals with Scheffe adjustment
L <- rep(0, C)
U <- rep(0, C)
Scheffe <- qchisq(1 - alpha, r - 1)
Expand Down
2 changes: 1 addition & 1 deletion R/the_paired_cxc_table_nominal.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ the_paired_cxc_table_nominal <- function(n, alpha = 0.05) {


cat_sprintf("\nTests and confidence intervals for individual categories:\n")
cat_sprintf("\nCategory Estimate ScheffE 95%%CI Bonferroni 95%%CI P-value*\n")
cat_sprintf("\nCategory Estimate Scheffe 95%%CI Bonferroni 95%%CI P-value*\n")
cat_sprintf("-------------------------------------------------------------------------------\n")
for (i in 1:c) {
tmp <- Scheffe_type_CIs_paired_cxc(n, alpha)
Expand Down
2 changes: 1 addition & 1 deletion R/validateArguments.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#' validate their arguments.
#' @param x named list containing function arguments and their values
#' @param types named vector of types for `x`
#' @return Nothing if all aguments fit their type. An error message otherwise.
#' @return Nothing if all arguments fit their type. An error message otherwise.
#' @author Waldir Leoncio
#' @details Accepted validation types are:
#' \itemize{
Expand Down
4 changes: 2 additions & 2 deletions man/MiettinenNurminen_asymptotic_score_CI_difference_2x2.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/Scheffe_type_CIs_paired_cxc.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/Scheffe_type_CIs_rxc.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/validateArguments.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions tests/testthat/test-ch4.R
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,11 @@ test_that("Chapter 4 functions basically work", {
)
expect_output(
object = print(MiettinenNurminen_asymptotic_score_CI_difference_2x2(matrix(c(2e6, 2, 2, 2e6), 2))),
regexp = "Mietinen-Nurminen .+ 1.0000 \\(95% CI 1.0000 to 1.0000\\)"
regexp = "Miettinen-Nurminen .+ 1.0000 \\(95% CI 1.0000 to 1.0000\\)"
)
expect_output(
object = print(MiettinenNurminen_asymptotic_score_CI_difference_2x2(matrix(c(2, 2e6, 2e6, 2), 2))),
regexp = "Mietinen-Nurminen .+ -1.0000 \\(95% CI -1.0000 to -1.0000\\)"
regexp = "Miettinen-Nurminen .+ -1.0000 \\(95% CI -1.0000 to -1.0000\\)"
)
expect_output(
object = print(MiettinenNurminen_asymptotic_score_CI_OR_2x2(lampasona_2013)),
Expand Down

0 comments on commit ecbbd51

Please sign in to comment.