McNemar_exact_unconditional_test_paired_2x2 {contingencytables}R Documentation

The McNemar exact unconditional test

Description

The McNemar exact unconditional test

Described in Chapter 8 "The Paired 2x2 Table"

Usage

McNemar_exact_unconditional_test_paired_2x2(
  n,
  gamma = 1e-04,
  num_pi_values = 1000L
)

Arguments

n

the observed table (a 2x2 matrix)

gamma

parameter for the Berger and Boos procedure (default=0.0001; gamma=0: no adj)

num_pi_values

number of values to use in the partition of the nuisance parameter space (default=1000)

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

Somewhat crude code with maximization over a simple partition of the nuisance parameter space into 'num_pi_values' equally spaced values The number may be changed. This method could be improved with a better algorithm for the maximization; however, it works well for most purposes. Try showplot=1 to get an indication of the precision. A refinement of the maximization can be done with a manual restriction of the parameter space.

Examples

McNemar_exact_unconditional_test_paired_2x2(bentur_2009)
## Not run: 
  McNemar_exact_unconditional_test_paired_2x2(cavo_2012, gamma = 0)
  McNemar_exact_unconditional_test_paired_2x2(ezra_2010)

## End(Not run)

[Package contingencytables version 3.0.0 Index]