simulatePed {pedSimulate} | R Documentation |
Simulate pedigree, genetic merits and phenotypes
Description
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.
Usage
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
)
Arguments
F0size |
: Even number of founder animals. No mortality, selection and non-random mating in this generation. |
Va0 |
: Additive genetic variance in the base generation (i.e., F0). |
Ve |
: Residual variance, constant across generations. |
littersize |
: Litter size, default = 1. |
ngen |
: Number of generations to simulate after the founder generation. |
mort.rate |
: 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 |
overlap.s |
: Number of overlapping generations for sires, default = 0 for no generation overlap. |
overlap.d |
: Number of overlapping generations for dams, default = 0 for no generation overlap. |
f.rate |
: Proportion of females selected as dams, default = 1. |
m.rate |
: Proportion of males ( |
fsel |
: If |
msel |
: If |
f.order |
: Ordering selected females for mating;
if |
m.order |
: Ordering selected males for mating;
if |
seed |
: A numeric variable input to the random number generator for reproducible simulations, default = 'NA' for non-reproducible simulations. |
Details
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
.
Value
ped : The output pedigree data.frame
. Further information provided in Details.
Examples
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
)