hwe: Tests for Hardy-Weinberg Equilibrium

Description Usage Arguments Value Author(s) Examples

View source: R/hwe.R

Description

This function tests for Hardy-Weinberg Equilibrium using the either the chi-square approximation or a permutation approach.

Usage

1
hwe(x, mode = c("Chi")[1], supress_warnings = FALSE)

Arguments

x

A data.frame with one or more locus objects in it

mode

The way in which the probabilities are estimated. Possible values include 'Chi': Chi-square approximation & 'Permute': A permutation approach

supress_warnings

A flag that prevents sample size warnings from being displayed (often helpful if you are simulating data sets for permutation)

Value

A data.frame with columns for Locus, Chi (the stat), df, and Prob.

Author(s)

Rodney J. Dyer rjdyer@vcu.edu

Examples

1
2
3
 data(arapat)
 sonora <- arapat[ arapat$Species=="Mainland",]
 hwe( sonora )

MarianaLag/Mlag documentation built on Feb. 13, 2020, 12:30 a.m.