See init_mutmodel for details.įwsim ( G, H0, N0, mutmodel, alpha = 1.0, SNP = FALSE, save_generations = NULL, progress = TRUE, trace = FALSE, ensure_children = FALSE. It then follows that the sum of the number of haplotypes follows a Poisson(α*M) distribution (as just stated in the previous paragraph) and that n conditionally on N follows a Binomial(N, m/M) as expected. Of children n is Poisson(α*m) distributed independently of other haplotypes.
Then we assume that N conditionally on M is Poisson(α*M) distributed for α > 0 ( α > 1 gives expected growth and 0 < α < 1 gives expected decrease).įor each haplotype x occuring m times in the i'th generation, the number Let M be the population size at generation i and N the population size at generation i + 1. Intermediate generations can be saved in order to study e.g.
The population sizes are either fixed (traditional/original Fisher-Wright model) or random Poisson distributed with exponential growth supported. This package provides tools to simulate a population under the Fisher-Wright model with a stepwise neutral mutation process on r loci, where mutations on loci happen independently. In fwsim: Fisher-Wright Population Simulationĭescription Usage Arguments Value Author(s) Examples