divlocus: Diversity score

Description Usage Arguments Details Value Author(s) References Examples

Description

Compute a measure of genetic diversity at each locus

Usage

1
divlocus(dat)

Arguments

dat

A binary matrix, rows are haplotypes and columns are binary markers

Details

This function implements a measure of diversity for a locus j as in Clayton (2002). If z_ij represents the allele j of haplotype i, for i=1,...,N and assuming that alleles are coded as 0 and 1, the diversity measure can be written as

D_j = 2*N( ∑_{i=1}^N z_{ij}^2 - (∑_{i=1}^N z_{ij}) ^2 )

Value

A vector containing the diversity measure for all markers

Author(s)

Giovanni Montana

References

D. Clayton. Choosing a set of haplotype tagging SNPs from a larger set of diallelic loci. 2002. www-gene.cimr.cam.ac.uk/clayton/software/stata/htSNP/htsnp.pdf

Examples

1
2

hapsim documentation built on May 1, 2019, 9:11 p.m.

Related to divlocus in hapsim...