xcount: Find Exact Number of Genotype Tables

Description Usage Arguments Value References See Also Examples

View source: R/xcount.R

Description

Use xcount to determine the exact number of tables (i.e., genotype numbers) for a given set of allele counts. This method enumerates all tables, and is best when the total number is less than 10^10 or so. This function is mostly called by hwx.test rather than directly by the user. If the number of tables is too large to enumerate with this method, use acount for an approximation.

Usage

1
xcount(m, safety = 1e+10, safeSecs = 10)

Arguments

m

vector containing the numbers of alleles of each type. Length must be at least 2 and all must be non-negative integers. It can also be a matrix of genotype counts.

safety

Stop execution if the approximate table number obtained from acount is more than this cutoff.

safeSecs

Time limit in seconds. Another safety feature to prevent getting stuck in a too-long computation

Value

The exact number of tables

References

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

See Also

hwx.test, acount

Examples

1
2
3
4
# Allele counts from human Rh locus. Guo and Thompson, 1992, Figure 1
#
alleles <- c(15, 14, 11, 12, 2, 2, 1, 3)
xcount(alleles)

HWxtest documentation built on May 29, 2017, 3:33 p.m.