Learn R Programming

coala (version 0.4.0)

sumstat_mcmf: Summary Statistic: Most Common Mutation's Frequency

Description

This summary statistic calculates the observed frequency of the mutational pattern that is observed most often in the data.

Usage

sumstat_mcmf(name = "mcmf", 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. Can also be "all" to calculate it from all populations.
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

A numeric vector containing MCMF for each locus.

See Also

To create a demographic model: coal_model

To calculate this statistic from data: calc_sumstats_from_data

Other summary statistics: sumstat_dna, sumstat_file, sumstat_four_gamete, sumstat_ihh, sumstat_jsfs, sumstat_nucleotide_div, sumstat_omega, sumstat_seg_sites, sumstat_sfs, sumstat_tajimas_d, sumstat_trees

Examples

Run this code
# Calculate MCMF for a panmictic population
model <- coal_model(10, 2) +
  feat_mutation(50) +
  sumstat_mcmf()
simulate(model)

Run the code above in your browser using DataLab