Description Usage Arguments Value Examples
This calculates Weir & Cockerham (1993)'s beta-hat. Beaumont & Nichols (1996) used this formulation in FDIST2 (and is implemented in Lositan) See the vignette for details on the calculation of beta.
1 | calc.betahat(df, i)
|
df |
A dataframe containing the genepop information, where the first column is the population ID. |
i |
Column number containing genotype information. |
ht |
HB (or 1-F1). This is a single numerical value. |
fst |
The calculated betahat value ((F0-F1)/(1-F1))for this locus. |
1 2 3 4 5 6 7 8 9 10 11 | gpop<-data.frame(popinfo=c(rep("POP 1", 20),rep("POP 2", 20)),ind.names=c(1:20,1:20))
for(i in 1:40){
gpop[1:20,(i+2)]<-sample(c("0101","0102","0202"),20,replace=TRUE)
gpop[21:40,(i+2)]<-sample(c("0101","0102","0202"),20,replace=TRUE)
}
bh<-calc.betahat(gpop, 3) #calculate betahat for the SNP
gfile<-system.file("extdata", "example.genepop.txt",package = 'fsthet')
gpop<-my.read.genepop(gfile)
beta1<-calc.betahat(gpop,3) #calculate betahat for the first SNP
|
Parsing Genepop file...
File description: Numerical Analysis with Nm=10, N=1000, 75 Demes, sampling 5 populations.
...done.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.