Description Usage Arguments Details Value Author(s) References Examples
Estimating g2 from microsatellite data
1 2 | g2_microsats(genotypes, nperm = 0, nboot = 0, boot_over = "inds",
CI = 0.95, verbose = TRUE)
|
genotypes |
|
nperm |
Number of permutations for testing the hypothesis that the empirical g2-value is higher than the g2 for random associations between individuals and genotypes. |
nboot |
Number of bootstraps for estimating a confidence interval |
boot_over |
Bootstrap over individuals by specifying "inds" and over loci with "loci". Defaults to "ind". |
CI |
Confidence interval (default to 0.95) |
verbose |
If FALSE, nothing will be printed to show the status of bootstraps and permutations. |
Calculates g2 from smaller datasets. The underlying formula is compationally expensive due to double summations over all paits of loci (see David et al. 2007). Use convert_raw to convert raw genotypes (with 2 columns per locus) into the required format.
g2_microsats returns an object of class "inbreed". The functions 'print' and 'plot' are used to print a summary and to plot the distribution of bootstrapped g2 values and CI.
An 'inbreed' object from g2_microsats
is a list containing the following components:
call |
function call. |
g2 |
g2 value |
p_val |
p value from permutation test |
g2_permut |
g2 values from permuted genotypes |
g2_boot |
g2 values from bootstrap samples |
CI_boot |
confidence interval from bootstraps |
se_boot |
standard error of g2 from bootstraps |
nobs |
number of observations |
nloc |
number of markers |
Martin A. Stoffel (martin.adam.stoffel@gmail.com) & Mareike Esser (messer@techfak.uni-bielefeld.de)
David, P., Pujol, B., Viard, F., Castella, V. and Goudet, J. (2007), Reliable selfing rate estimates from imperfect population genetic data. Molecular Ecology, 16: 2474
1 2 3 4 | data(mouse_msats)
# tranform raw genotypes into 0/1 format
genotypes <- convert_raw(mouse_msats)
(g2_mouse <- g2_microsats(genotypes, nperm = 1000, nboot = 100, boot_over = "inds", CI = 0.95))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.