Fst: Estimation Wright's Fst parameter

Description Usage Arguments Value Author(s) Examples

View source: R/fst.R

Description

This function estimates Wright's Fst parameter, the one based upon the variance in p, most applicable to a 2-allele locus. The results are returned as a data.frame.

Usage

1
Fst(x, stratum = "Population", nperm = 0)

Arguments

x

A data.frame with locus objects. If there is more than one locus present, it will estimate the parameter for each locus. It DOES NOT estimate the multilocus Fst (and do not even think of averaging the single locus estimates).

stratum

Either the name of the column representing strata in x. By default, this function will use "Population".

nperm

The number of permutations to run to test Fst=0 hypothesis.

Value

An data.frame with Fst, sigma_p (variance among populations), and pq the total variance at the locus.

Author(s)

Rodney J. Dyer rjdyer@vcu.edu

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
 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))
 df <- data.frame(Population,locus)
 Fst( df )
 locus2 <- c(AA,AA,AA,AA,AA,BB,BB,BB,BB,BB)
 df <- data.frame( Population, TPI=locus, PGM=locus2 )
 Fst( df )

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