Description Usage Arguments Details Examples
finite_non_rand2
simulates finite Mendelian populations with non-random mating over many generations.
Specify initial allele frequencies, population size, number of generations, outcrossing rate, and number of replicates.
The simulation produces each generation of the population by randomly selecting 2N (ND) alleles for N (ND) individuals from a gamete pool based on
the allele frequencies.
1 2 3 4 5 6 7 8 9 | finite_non_rand2(
outcrossingrate_nr,
p1g2_nr,
p2g2_nr,
alleles,
ND_nr,
generations_nr,
n_rep
)
|
outcrossingrate_nr |
Outcrossing rate |
p1g2_nr |
Allele 1 frequency |
p2g2_nr |
Allele 2 frequency |
alleles |
Allele types (use 1 and 2) |
ND_nr |
Population size |
generations_nr |
Number of generations |
n_reps |
Number simulation replicates |
finite_non_rand
returns three plots:
1) Allele 1 frequency versus number of generations, 2) Observed and expected heterozygosity (expected based on
allele frequencies and drift) 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.
1 | finite_non_rand(0.5,0.3,0.7,c(1,2),25,100,100)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.