Simulate pedigree, genetic merits and phenotypes with random/assortative/disassortative matings followed by random/non-random selection of males and females with similar/different selection patterns in males and females.
simulatePed(
F0size,
Va0,
Ve,
littersize = 1,
ngen,
mort.rate = 0,
overlap.s = 0,
overlap.d = 0,
f.rate = 1,
m.rate = 1,
fsel = "R",
msel = "R",
f.order = "fsel",
m.order = "msel",
seed = NA
)
ped : The output pedigree data.frame
. Further information provided in Details.
: Even number of founder animals. No mortality, selection and non-random mating in this generation.
: Additive genetic variance in the base generation (i.e., F0).
: Residual variance, constant across generations.
: Litter size, default = 1.
: Number of generations to simulate after the founder generation.
: Mortality rate per generation, after the availability of phenotype (e.g., birth weight, weaning weight)
and before the age of maturity (i.e., before mating), default = 0. Maximum mort.rate
= 0.5.
: Number of overlapping generations for sires, default = 0 for no generation overlap.
: Number of overlapping generations for dams, default = 0 for no generation overlap.
: Proportion of females selected as dams, default = 1.
: Proportion of males (<= f.rate
) selected as sires, default = 1.
: If "R"
(default), random selection on females;
if "P"
, selection on phenotypes or true breeding values if Ve
= 0;
if "PA"
, selection on true parent averages.
"-P"
and "-PA"
work in opposite direction of "P"
and "PA"
, respectively.
: If "R"
(default), random selection on males;
if "P"
, selection on phenotypes or true breeding values if Ve
= 0;
if "PA"
, selection on true parent averages.
"-P"
and "-PA"
work in opposite direction of "P"
and "PA"
, respectively.
: Ordering selected females for mating;
if "fsel"
(default), same as the selection order;
if "R"
random ordering;
if "P"
, ordering based on phenotypes or true breeding values if Ve
= 0;
if "PA"
, ordering based on true parent averages.
"-P"
and "-PA"
work in opposite direction of "P"
and "PA"
, respectively.
: Ordering selected males for mating;
if "msel"
(default), same as the selection order;
if "R"
random ordering;
if "P"
, ordering based on phenotypes or true breeding values if Ve
= 0;
if "PA"
, ordering based on true parent averages.
"-P"
and "-PA"
work in opposite direction of "P"
and "PA"
, respectively.
: A numeric variable input to the random number generator for reproducible simulations, default = `NA` for non-reproducible simulations.
The output pedigree data.frame
(ped
) has 9 columns: ID, SIRE, DAM, SEX,
GEN (generation number starting with 0 for the base generation), PA (parent average),
MS (Mendelian Sampling), E (environment and residuals), and P (phenotype).
Random, assortative, and disassortative matings can be simulated with different combinations of
fsel
, msel
, f.order
, and m.order
.
ped = simulatePed(
F0size = 100,
Va0 = 9,
Ve = 36,
littersize = 2,
ngen = 4,
mort.rate = 0.05,
overlap.s = 1,
overlap.d = 0,
f.rate = 0.8,
m.rate = 0.5,
fsel = "P",
msel = "PA",
f.order = "fsel",
m.order = "msel",
seed = 68
)
Run the code above in your browser using DataLab