Learn R Programming

coala (version 0.2.0)

sumstat_nucleotide_div: Calculates the Nucleodite Diversity Pi

Description

This calculates the nucleotide diversity / mean pairwise difference usually for a population.

Usage

sumstat_nucleotide_div(name = "pi", population = 1,
  transformation = identity)

Arguments

name
The name of the summary statistic. When simulating a model, the value of the statistics are written to an entry of the returned list with this name. Summary statistic names must be unique in a model.
population
The population for which the statistic is calculated.
transformation
An optional function for transforming the results of the statistic. If specified, the results of the transformation are returned instead of the original values.

Value

  • On simulation, this returns a vector with the value of pi for each locus.

Details

The statistic is usually denoted by pi and can be used as an estimator for the per locus scaled muation rate theta.

It was introducted by

Nei and Li (1979). "Mathematical Model for Studying Genetic Variation in Terms of Restriction Endonucleases". PNAS 76 (10): 5269-73. doi:10.1073/pnas.76.10.5269.