Learn R Programming

jaatha (version 2.7.0)

dm.addSummaryStatistic: Adds a summary statistic to the model.

Description

This summary statistic will the be calulated for each simualtion and returned by the simSumStats function.

Usage

dm.addSummaryStatistic(dm, sum.stat, group = 0)

Arguments

dm
The demographic model to which a summary statistic should be added.
sum.stat
The summary statistic to add. Use the names mentioned above.
group
If given, the summary statistic is only calculated for a given group of loci.

Value

  • The model with a summary statistic added.

Details

Avaible summary statistics are 'jsfs' - calculates the Joint Site Frequency Spectrum 'seg.sites' - return the simulated segregating sites as matrix 'file' - returns a file in which the simulation output is written 'fpc' - calculates the Four-Gamete-Condition based statistic

Examples

Run this code
dm <- dm.createThetaTauModel(c(15, 20), 100)
dm <- dm.addSummaryStatistic(dm, 'seg.sites')
str(dm.simSumStats(dm, c(1, 5)))

Run the code above in your browser using DataLab