Learn R Programming

FinePop (version 1.1.1)

thetaWC.pair: Weir and Cockerham's theta adapted for pairwise Fst.

Description

This function estimates Fst between population pairs based on Weir and Cockerham's theta (Weir & Cockerham 1984) adapted for pairwise comparison.

Usage

thetaWC.pair(popdata)

Arguments

popdata
Population data object created by read.genepop function from a GENEPOP file (Rousset 2008).

Value

Matrix of estimated pairwise Fst by theta with finite sample correction.

Details

Weir and Cockerham (1984) derived an unbiased estimator of a coancestry coefficient (theta) based on a random effect model. It expresses the extent of genetic heterogeneity within the population. The second stage common approach is to investigate the detailed pattern of the population structure, based on a measure of genetic difference between pairs of subpopulations (demes). We call this by pairwise Fst. This function follows the formula of Weir and Cockerham's theta with the sample size r = 2. Given the pair, our finite sample correction multiplies a of Weir & Cockerham's theta by (r - 1) / r (equation 2 in p.1359 of Weir & Cockerham 1984).

References

Rousset F (2008) Genepop'007: a complete reimplementation of the Genepop software for Windows and Linux. Mol. Ecol. Resources, 8, 103-106. Weir BS, Cockerham CC (1984) Estimating F-statistics for the analysis of population structure. Evolution, 38, 1358-1370.

See Also

read.genepop

Examples

Run this code
# data
data(data.JSM)
cat(data.JSM$genepop, file="JSM_genepop.txt", sep="\n")
cat(data.JSM$popname, file="JSM_popname.txt", sep=" ")
popdata <- read.genepop(genepop="JSM_genepop.txt", popname="JSM_popname.txt")

# theta estimation
result.theta.pair <- thetaWC.pair(popdata)
write.csv(result.theta.pair, "result_thetaWCpair.csv", na="")

Run the code above in your browser using DataLab