ldNe: ldNe

Description Usage Arguments Value Author(s) References

View source: R/ldNe.R

Description

Estimate Ne from linkage disequilibrium based on Pearson correlation approximation following Waples et al 2016. Adapted from code by R. Waples and W. Larson.

Usage

1
2
3
4
5
6
7
8
ldNe(
  g,
  maf.threshold = 0,
  by.strata = FALSE,
  ci = 0.95,
  drop.missing = FALSE,
  num.cores = 1
)

Arguments

g

a gtypes object.

maf.threshold

smallest minimum allele frequency permitted to include a locus in calculation of Ne.

by.strata

apply the 'maf.threshold' by strata. If 'TRUE' then loci that are below this threshold in any strata will be removed from the calculation of Ne for all strata. Loci below 'maf.threshold' within a stratum are always removed for calculations of Ne for that stratum.

ci

central confidence interval.

drop.missing

drop loci with missing genotypes? If 'FALSE', a slower procedure is used where individuals with missing genotypes are removed in a pairwise fashion.

num.cores

The number of cores to use to distribute computations over. If set to NULL, the value will be what is reported by detectCores - 1.

Value

a data.frame with one row per strata and the following columns:

stratum

stratum being summarized

S

harmonic mean of sample size across pairwise comparisons of loci

num.comp

number of pairwise loci comparisons used

mean.rsq

mean r^2 over all loci

mean.E.rsq

mean expected r^2 over all loci

Ne

estimated Ne

param.lci, param.uci

parametric lower and upper CIs

Author(s)

Eric Archer eric.archer@noaa.gov

References

Waples, R.S. 2006. A bias correction for estimates of effective population size based on linkage disequilibrium at unlinked gene loci. Conservation Genetics 7:167-184.
Waples RK, Larson WA, and Waples RS. 2016. Estimating contemporary effective population size in non-model species using linkage disequilibrium across thousands of loci. Heredity 117:233-240; doi:10.1038/hdy.2016.60


strataG documentation built on Feb. 28, 2020, 9:07 a.m.