Dest: Estimation Joost's Dest parameter

Description Usage Arguments Value Author(s) Examples

View source: R/dest.R

Description

This function estimates the parameter (and potentially the confidence surrounding its value) for Joost's Dest.

Usage

1
Dest(x, stratum = "Population", nperm = 0, size.correct = FALSE)

Arguments

x

A vector of locus objects or a data.frame with locus objects.

stratum

Either a vector of strata variables if x is a locus vector or the name of the column representing strata in x if it is a data.frame.

nperm

The number of permutations to run for significance of the estimator.

size.correct

A flag indicating that the estimate should be corrected for based upon sample sizes (default=TRUE).

Value

A data.frame with Dest, Hs, Ht, and P (if asked for). When multiple loci are provided, the results also provide a multilocus estimate using the harmonic mean.

Author(s)

Rodney J. Dyer rjdyer@vcu.edu

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
 a1 <- sample( LETTERS[1:5], size=20, replace=TRUE)
 a2 <- sample( LETTERS[4:8], size=20, replace=TRUE)
 raw_alleles <- matrix( c(a1,a2), ncol=2, byrow=TRUE )
 locus <- locus( raw_alleles, type="column")
 Population <- c(rep("Pop-A",10),rep("Pop-B",10))
 Dest( locus, Population )
 a1 <- sample( LETTERS[1:5], size=20, replace=TRUE)
 a2 <- sample( LETTERS[4:8], size=20, replace=TRUE)
 raw_alleles <- matrix( c(a1,a2), ncol=2, byrow=TRUE )
 locus2 <- locus( raw_alleles, type="column")
 df <- data.frame( Population, TPI=locus, PGM=locus2 )
 Dest( df, nperm=99)

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