
The i'th element is the count of the haplotype H0. The number of loci is the length or number of columns of H0.Ĭount of the H0 haplotypes. Must be a vector or matrix (if more than one initial haplotype). Number of generations to evolve (integer, remember postfix L). ) # S3 method for class 'fwsim' plot ( x, which = 1L. ) # S3 method for class 'fwsim' summary ( object. ) # S3 method for class 'fwsim' print ( x. ) fwsim_fixed ( G, H0, N0, mutmodel, SNP = FALSE, save_generations = NULL, progress = TRUE, trace = FALSE. 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
