calc_fis | R Documentation |
Calculates FIS for each individual level in each provided sample facet according to Weir and Cockerham (1984).
calc_fis(
x,
facets = NULL,
boot = FALSE,
boot_par = FALSE,
boot_alt = "two-sided",
boot_confidence = 0.95,
keep_components = FALSE
)
x |
snpRdata. Input SNP data. |
facets |
character. Categorical metadata variables by which to break up
analysis. See |
boot |
numeric or |
boot_par |
numeric or |
boot_alt |
character, default "two-sided". The type of t-test to conduct on the bootstrapped FIS values. Options:
|
boot_confidence |
numeric, default 0.95. The confidence level to use
for generating confidence levels for bootstraps. Note that a value of
0.95 will result in a call of |
keep_components |
logical, default |
Note that FIS is calculated by considering only data from individual sample levels! This means that individual and sub-population variances are only considered within each sub-population. If snp facets are provided, weighted means will be provided for each snp facet level, although raw values are calculated on a per-snp basis and thus ignore these levels.
If the base facet (facets = NULL or facets = ".base") is requested, FIS will compare individual to total variance across all samples instead (equivalent to overall FIT).
Bootstrapping across loci can be done to assess FIS significance. This is done by re-drawing loci randomly with replacement for each facet level, calculating the resulting FIS values, and doing one sample t-test with the null hypothesis that FIS = 0 to calculate p-values and confidence intervals.
William Hemstrom
Weir and Cockerham (1984). Evolution
x <- calc_fis(stickSNPs, c("pop", "pop.chr"))
get.snpR.stats(x, c("pop", "pop.chr"), "fis")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.