Learn R Programming

mmod (version 1.3.2)

chao_bootstrap: Produce bootstrap samples from each subpopulation of a genind object

Description

This function produces bootstrap samples from a genind object, with each subpopulation resampled according to its size. Because there are many statistics that you may wish to calculte from these samples, this function returns a list of genind objects representing bootsrap samples that can then be futher processed (see examples).

Usage

chao_bootstrap(x, nreps = 1000)

Arguments

x
genind object (from package adegenet)
nreps
numeric number of bootstrap replicates to perform (default 1000)

Value

A list of genind objects

Details

You should note, this is a standard (frequentist) approach to quantifying uncertainty - effectively asking "if the population was exactly like our sample, and we repeatedly took samples like this from it, how much would those samples vary?" The confidence intervals don't include uncertainty produced from any biases in the way you collected your data. Additionally, this boostrapping procedure displays a slight upward bias for some datasets. If you plan or reporting a confidence interval for your statistic, it is probably a good idea to subtract the difference between the point estimate of the statistic and the mean of the boostrap distribution from the extremes of the interval (as demonstrated in the expample below)

References

Chao, A. et al. (2008). A Two-Stage probabilistic approach to Multiple-Community similarity indices. Biometrics, 64:1178-1186

See Also

Other resample: jacknife_populations, summarise_bootstrap

Examples

Run this code
## Not run:   
# data(nancycats)
# obs.D <- D_Jost(nancycats)
# bs <- chao_bootstrap(nancycats)
# bs_D <- summarise_bootstrap(bs, D_Jost)
# bias <- bs.D$summary.global.het[1] - obs.D$global.het
# bs.D$summary.global.het - bias
# ## End(Not run)

Run the code above in your browser using DataLab