Gst: Estimation Nei's Gst parameter

Description Usage Arguments Value Author(s) Examples

View source: R/gst.R

Description

This function estimates Nei's Gst parameter and potentially returns the components of it as well as the probability. The results are returned as a data.frame.

Usage

1
Gst(x, stratum = "Population", nperm = 0, size.correct = TRUE)

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

An data.frame with Gst, Ht, and Hs and optionally P

Author(s)

Rodney J. Dyer rjdyer@vcu.edu

Examples

1
2
3
4
5
6
7
8
9
 AA <- locus( c("A","A") )
 AB <- locus( c("A","B") )
 BB <- locus( c("B","B") )
 locus <- c(AA,AA,AA,AA,BB,BB,BB,AB,AB,AA)
 Population <- c(rep("Pop-A",5),rep("Pop-B",5))
 Gst( locus, Population, nperm=99 )
 locus2 <- c(AB,BB,AA,BB,BB,AB,AB,AA,AA,BB)
 df <- data.frame( Population, TPI=locus, PGM=locus2 )
 Gst( df, nperm=99)

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