Learn R Programming

mmod (version 1.3.2)

summarise_bootstrap: Apply a differentiation statistic to a bootstrap sample

Description

This function applies a differentiation statistic (eg, D_Jost, Gst_Hedrick or Gst_Nei) to a list of genind objects, possibly produced with chao_bootsrap or jacknife_populations.

Usage

summarise_bootstrap(bs, statistic)

Arguments

bs
list of genind objects
statistic
differentiation statistic to apply (the function itself, as with apply family functions)

Value

per.locus: matirx of statistics calculated for each locus (column) and each bootstrap replicate (row).global.het: vector of global estimates calculated from overall heterozygosityglobal.het: vector of global estimates calculated from harmonic mean of statistic (only applied to D_Jost)summary.loci: data.frame summarising the distribution of the chosen statistic across replicates. Details of the different confidence intervals are given in detailssummary.global_het: A vector containing the same measures as summary.loci but for a global value of the statistic calculated from all locisummary.global_harm: As with summary.global_het but calculated from the harmonic mean of the statistic across loci (only applies to D_Jost)

Details

Two different approaches are used for calculating confidence intervals in the results. The estimates given by lower.percentile and upper.percentile are simply the 2.5th and 97.5th precentile of the statistic across bootstrap samples. Note, the presence or rare alleles in some populations can bias bootstrapping procedures such that these intervals are not centered on the observed value. The mean of statistic across samples is returned as mean.bs and can be used to correct biased bootsrap samples. Alternatively, lower.normal and upper.normal form a confidence interval centered on the observed value of the statistic and using the standard deviation of the statistic across replicates to generate limits (sometimes called the normal-method of obtaining a confidence interval). The print function for objects returned by this function displays the normal-method confidence intervals.

See Also

Other resample: chao_bootstrap, jacknife_populations

Examples

Run this code
## Not run:   
# data(nancycats)
# bs <- chao_bootstrap(nancycats)
# summarise_bootstrap(bs, D_Jost)
# ## End(Not run)

Run the code above in your browser using DataLab