Last data update: 2014.03.03

R: P-values for three different tests of HWE
HWE2sidedR Documentation

P-values for three different tests of HWE

Description

Calculates conditional p-values proposed in Kulinskaya (2008) to overcome the problems of asymetric distributions, the Haldane 2-sided test as implemented by Wiggington et al (2005) and the 1-sided test for inbreeding.

Usage

HWE2sided(geno, qplot = F, title = NULL)

Arguments

geno

Vector of genotype counts: no. heterozygotes followed by the nos. homozygotes

qplot

If qplot is true the distribution of the null hypothesis is plotted

title

Title for the plot

Value

pval.cond

Conditional p-value

pval.H

2-sided Haldane p-value

pval.inbreed

1-sided test for inbreeding

Author(s)

Alex Lewin

References

Kulinskaya and Lewin 2008

See Also

HWE2sided.table

Examples

geno <- c(20,73,7)
HWE2sided(geno)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(LDtests)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/LDtests/HWE2sided.Rd_%03d_medium.png", width=480, height=480)
> ### Name: HWE2sided
> ### Title: P-values for three different tests of HWE
> ### Aliases: HWE2sided
> ### Keywords: htest
> 
> ### ** Examples
> 
> geno <- c(20,73,7)
> HWE2sided(geno)
$pval.cond
[1] 0.01248399

$pval.H
[1] 0.007101873

$pval.inbreed
[1] 0.007101873

> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>