hwe: Tests for Hardy-Weinberg Equilibrium

View source: R/hwe.R

hweR Documentation

Tests for Hardy-Weinberg Equilibrium

Description

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

Usage

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

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

dyerlab/gstudio documentation built on Feb. 2, 2024, 8:24 p.m.