Skip to contents

Founders, discrete generations by random mating, true breeding values by Mendelian sampling, phenotypes with a chosen heritability, and (optionally) gene-dropped genotypes consistent with the pedigree. Exists so that examples, gates and method studies share ONE honest generator instead of each inventing its own.

Usage

simulate_breeding(
  n_founders = 40,
  n_generations = 3,
  offspring_per_generation = 60,
  h2 = 0.4,
  n_markers = 0,
  seed = 1
)

Arguments

n_founders

founders in generation zero

n_generations

generations bred after the founders

offspring_per_generation

animals born per generation

h2

narrow-sense heritability of the phenotype

n_markers

if positive, gene-drop this many biallelic markers

seed

RNG seed

Value

list with pedigree (id/sire/dam), data (id, cg, y), tbv (true breeding values, named), and genotypes (NULL, or the list(ids, m) shape)