Exact conditional and mid-P tests for the rxc table: the Fisher-Freeman-Halton, Pearson, likelihood ratio, Kruskal-Wallis, linear-by-linear, and Jonckheere-Terpstra tests.

Described in Chapter 7 "The rxc Table"

Exact_cond_midP_tests_rxc(n)

Arguments

n

the observed counts (an rxc matrix)

Value

An object of the contingencytables_result class, basically a subclass of base::list(). Use the utils::str() function to see the specific elements returned.

Note

Works only for 3x2 and 3x3 tables

Examples

Exact_cond_midP_tests_rxc(table_7.3)  # a 3x2 table
#> 
#> Exact Fisher-Freeman-Halton: P = 0.0002711
#> Mid-P Fisher-Freeman-Halton: P = 0.0002674
#> Exact Pearson statistic:     P = 0.0001546
#> Mid-P Pearson statistic:     P = 0.0001509
#> Exact LR statistic:          P = 0.0003031
#> Mid-P LR statistic:          P = 0.0002994
#> Exact Kruskal-Wallis:        P = 0.0001546
#> Mid-P Kruskal-Wallis:        P = 0.0001509
#> Exact linear-by-linear:      P = 0.9998521
#> Mid-P linear-by-linear:      P = 0.9997592
#> Exact Jonckheere-Terpstra:   P = 0.9996747
#> Mid-P Jonckheere-Terpstra:   P = 0.9996710
if (FALSE) { # \dontrun{
  Exact_cond_midP_tests_rxc(table_7.6) # a 3x3 table
} # }