paired.reject.region.RdDetermines the rejection region for comparing two paired proportions.
The total sample size
Indicates the alternative hypothesis: must be either "two.sided", "less", or "greater"
Significance level
Number: The number of nuisance parameters considered
Logical: Indicates if a confidence interval on the nuisance parameter should be computed
Number: Confidence level for constructing the interval of nuisance parameters considered. Only used if np.interval=TRUE
Indicates the method for finding the more extreme tables: must be either "UAM", "UCM", "UAMCC", "CSM", "CM", "AM", or "AMCC"
A character string describing the method to implement two-sided tests
Number: null hypothesis of the difference in proportion
Logical: assumes convexity for interval approach. Only used if np.interval=TRUE
Logical: uses stored CSM ordering matrix. Only used if method="csm"
The rejection region is calculated for paired samples. Rejection region can be determined for any unconditional exact test in paired.exact.test, the Conditional McNemar's (CM) exact test, the Asymptotic McNemar's (AM) test, or Asymptotic McNemar's test with Continuity Correction (AMCC) (note: asymptotic tests are not exact tests). In very rare cases, using the nuisance parameter interval approach does not attain the convexity property, so it is possible using convexity=TRUE could yield an inaccurate power calculation with this method. This is extremely unlikely though, so default is to assume convexity and speed up computation time. For details regarding parameters, see paired.exact.test.
A matrix of the rejection region. The rows and columns represent the discordant pairs. Specifically, the columns represent x12, the number of successes in first group and number of failures in second group, and rows represent x21, the number of failures in first group and number of successes in second group. The number of concordant pairs is simply the total sample size minus number of discordant pairs. The cells represent whether the test is rejected (1) or failed to be rejected (0). Values with an NA are not possible. This matrix represents all possible 2x2 tables.
McNemar's asymptotic tests are not exact test and may have inflated type 1 error rates. These options were added to compute the rejection region efficiently when using asymptotic tests.
if (FALSE) { # \dontrun{
# Ensure that the ExactData R package is available before running the CSM test.
if (requireNamespace("ExactData", quietly = TRUE)) {
paired.reject.region(N=15, alternative="two.sided", method="CSM")
}
} # }
paired.reject.region(N=15, alternative="less", method="UAM", delta=0.10)
#> 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#> 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1
#> 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 NA
#> 2 0 0 0 0 0 0 1 1 1 1 1 1 1 1 NA NA
#> 3 0 0 0 0 0 0 0 1 1 1 1 1 1 NA NA NA
#> 4 0 0 0 0 0 0 0 0 0 1 1 1 NA NA NA NA
#> 5 0 0 0 0 0 0 0 0 0 0 0 NA NA NA NA NA
#> 6 0 0 0 0 0 0 0 0 0 0 NA NA NA NA NA NA
#> 7 0 0 0 0 0 0 0 0 0 NA NA NA NA NA NA NA
#> 8 0 0 0 0 0 0 0 0 NA NA NA NA NA NA NA NA
#> 9 0 0 0 0 0 0 0 NA NA NA NA NA NA NA NA NA
#> 10 0 0 0 0 0 0 NA NA NA NA NA NA NA NA NA NA
#> 11 0 0 0 0 0 NA NA NA NA NA NA NA NA NA NA NA
#> 12 0 0 0 0 NA NA NA NA NA NA NA NA NA NA NA NA
#> 13 0 0 0 NA NA NA NA NA NA NA NA NA NA NA NA NA
#> 14 0 0 NA NA NA NA NA NA NA NA NA NA NA NA NA NA
#> 15 0 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA