gs_breeders: Simulate population demographics under selection with the...

View source: R/gs.R

gs_breedersR Documentation

Simulate population demographics under selection with the Breeder's Equation.

Description

Uses several equations from Burger and Lynch 1995 to calculate ne and additive genetic variance, but otherwise simulates purely based on the Breeder's Equation.

Usage

gs_breeders(
  phenotypes,
  h,
  B,
  K,
  omega,
  var.theta,
  k,
  gens = Inf,
  n = NULL,
  nloci = NULL,
  alpha = NULL,
  mu = NULL
)

Arguments

phenotypes

numeric. Vector of initial phenotypes.

h

numeric. Heritability of the trait.

B

numeric. Number of offspring each surviving adult has. Not stochastic.

K

numeric. Carrying capacity. Individuals surviving selection will be randomly culled to this number.

omega

numeric. Width of the selection function. Smaller numbers equate to stronger selection around the optimum.

var.theta

numeric. Variance of the stochastic selection optimum.

k

numeric. Amount by which the optimum phenotype increases each generation (where mean(opt) = k*t).

gens

numeric, default Inf. Number of generations to iterate.

n

numeric, default NULL. Initial population size. If null, equal to the number of provided phenotypes.

nloci

numeric, default NULL. Number of effective loci. If nloci, alpha, and mu are all provided, the stochastic house of cards approximation of genetic variance is used to approximate changes in genetic variance each generation based only on changes in effective population size.

alpha

numeric, default NULL. Standard deviation of the effect of new mutations. If nloci, alpha, and mu are all provided, the stochastic house of cards approximation of genetic variance is used to approximate changes in genetic variance each generation based only on changes in effective population size.

mu

numeric, default NULL. Mutation rate. If nloci, alpha, and mu are all provided, the stochastic house of cards approximation of genetic variance is used to approximate changes in genetic variance each generation based only on changes in effective population size.

Details

If nloci, alpha, and mu are all provided, the stochastic house of cards approximation of genetic variance is used to approximate changes in genetic variance each generation based only on changes in effective population size. Otherwise, genetic variance is assumed to not change in each generation and is based solely on the genetic variance calculated from the provided heritability and phenotypes.


hemstrow/GeneArchEst documentation built on June 10, 2025, 5:06 a.m.