Learn R Programming

coala (version 0.2.0)

sumstat_tajimas_d: Tajima's D

Description

This calculates Tajima's D from the simulation results when added to a model.

Usage

sumstat_tajimas_d(name = "tajimas_d", population = "all",
  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 Tajima's D for each locus.

Details

Tajima's D was introduced by

Tajima, F. (1989). "Statistical method for testing the neutral mutation hypothesis by DNA polymorphism.". Genetics 123 (3): 585-95.