fishertest.ANSM {ANSM5}R Documentation

Perform Fisher exact test

Description

fishertest.ANSM() is a wrapper for fisher.test() from the stats package - performs the Fisher exact test and is used in chapters 6, 12 and 13 of "Applied Nonparametric Statistical Methods" (5th edition)

Usage

fishertest.ANSM(
  x,
  y,
  H0 = NULL,
  alternative = c("two.sided", "less", "greater"),
  max.exact.cases = 10000,
  do.exact = TRUE
)

Arguments

x

Numeric vector or factor

y

Numeric vector or factor

H0

Null hypothesis value (defaults to NULL)

alternative

Type of alternative hypothesis (defaults to two.sided)

max.exact.cases

Maximum number of cases allowed for exact calculations (defaults to 10000)

do.exact

Boolean indicating whether or not to perform exact calculations (defaults to TRUE)

Value

An ANSMtest object with the results from applying the function

Examples

# Example 6.7 from "Applied Nonparametric Statistical Methods" (5th edition)
fishertest.ANSM(ch6$males, ch6$females)

# Exercise 13.10 from "Applied Nonparametric Statistical Methods" (5th edition)
fishertest.ANSM(ch13$laid.off, ch13$employee.ages)


[Package ANSM5 version 1.1.0 Index]