non_rand_mating: Simulating non-random mating Mendelian populations

Description Usage Arguments Details Examples

Description

non_rand_mating simulates non-random mating Mendelian populations by specifying allele frequencies, population size, and outcrossing rate. The simulation generates a parent population with N individuals with 2N alleles by randomly sampling from a gamete pool based on the specified allele frequencies. Then parents are randomly selected to mate where the outcrossing rate determines whether they mate with themselves or another randomly selected individual.

Usage

1
non_rand_mating(outcrossingrate, p1, p2, alleles, N)

Arguments

outcrossingrate

probability an individual mates with a randomly selected individual from the parent population

p1

Allele 1 frequency

p2

Allele 2 frequency

alleles

allele types (use 1 and 2)

N

Population size

Details

non_rand_mating returns the allele frequencies, observed and expected heterozygosities, Wright's F, and Fisher's exact (fisher.test) tests comparing the observed genotype counts to the expected and initial values.

Examples

1
non_rand_mating(0.5,0.3,0.7,c(1,2),1000)

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