p.value: Extract just the P value(s) from a Hardy-Weinberg test.

Description Usage Arguments Value References Examples

Description

Use the p.value function to return just the P value(s) from the results of a call to hwx.test. If applied to a list of results, it will return a vector or matrix of P values. You can specify the statName as “LLR”, “Prob”, “U” or “Chisq”. You can also apply p.value to a matrix or vector and it will attempt to use hwx.test to return a P value. However, it's usually preferable to use hwx.test directly.

Usage

1
p.value(x, statName = NA)

Arguments

x

The result of a call to hwx.test or a list of such results. It can also be the genotype counts in any of the same formats as accepted by hwx.test

statName

can be “LLR”, “Prob”, “U”, or “Chisq”

Value

The P value

References

The methods are described by Engels, 2009. Genetics 183:1431.

Examples

1
2
3
4
data(HWcases)
testResults <- hwx.test(HWcases)
p.value(testResults)
p.value(testResults, statName="U")

HWxtest documentation built on May 31, 2019, 9:04 a.m.

Related to p.value in HWxtest...