finite_pop: Simulating single locus, two allele Mendelian populations...

Description Usage Arguments Details Examples

Description

finite_pop simulates Mendelian populations over many generations. Specify initial allele frequencies, population size, and the number of generations. The simulation produces each generation of the population by randomly selecting 2N (ND) alleles for N (ND) individuals from a gamete pool based on allele frequencies.

Usage

1
finite_pop(p1g2, p2g2, alleles, ND, generations)

Arguments

p1g2

Allele 1 frequency

p2g2

Allele 2 frequency

alleles

allele types (use 1 and 2)

ND

Population size

generations

number of generations

Details

finite_pop returns three plots: 1) Allele 1 frequency versus number of generations, 2) Observed and expected heterozygosity versus number of generations, and 3) Wright's F with a loess regression best fit line. It also returns Fisher's exact tests (fisher.test) comparing the observed genotype counts to the expected and initial values.

Examples

1
finite_pop(0.3,0.7,c(1,2),100,100)

doublearon83/pop.gen.sims2 documentation built on Dec. 20, 2021, 1:10 a.m.