Learn R Programming

pedSimulate (version 0.1.2)

assortative: Data simulation with assortative/disassortative matings

Description

Simulate Pedigree, genetic merits and phenotypes with assortative/disassortative mating followed by non-random selection, differntly for males and females.

Usage

assortative(
  F0size,
  f.rate = 1,
  m.rate = 1,
  mort.rate = 0,
  littersize = 1,
  ngen,
  overlap.s = 0,
  overlap.d = 0,
  Va0,
  Ve,
  fsel = "P",
  msel = "P",
  negative = FALSE
)

Arguments

F0size

: Even number of founder animals. No mortality and selection in this generation, and matings are random in this generation.

f.rate

: Proportion of females selected as dams, default = 1.

m.rate

: Proportion of males (<= f.rate) selected as sires, default = 1.

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 mort.rate = 0.5.

littersize

: Litter size, default = 1.

ngen

: Number of generations to simulate.

overlap.s

: Number of generation overlaps for sires, default = 0 for no generation overlap.

overlap.d

: Number of generation overlaps for dams, default = 0 for no generation overlap.

Va0

: Additive genetic variance in the base generation (i.e., F0).

Ve

: Environment (plus residual) variance, set constant across generations.

fsel

: If "P" (default), selection on phenotypes or true breeding values if Ve = 0; if "PA", selection on true parent averages; redundant if f.rate = 1. "-P" and "-PA" work in opposite direction of "P" and "PA", respectively.

msel

: If "P" (default), selection on phenotypes or true breeding values if Ve = 0; if "PA", selection on true parent averages; redundant if m.rate = 1. "-P" and "-PA" work in opposite direction of "P" and "PA", respectively.

negative

: Assortative mating if TRUE (default) and disassortative mating if false. Males are sorted based on msel and females are sorted based on fsel.

Value

ped : The output pedigree data.frame. Further information provided in Details.

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).

Examples

Run this code
# NOT RUN {
ped = assortative(
    F0size = 100,
    f.rate = 0.8,
    m.rate = 0.5,
    mort.rate = 0.05,
    littersize = 2,
    ngen = 4,
    overlap.s = 1,
    overlap.d = 0,
    negative = FALSE,
    Va0 = 9,
    Ve = 36,
    fsel = "P",
    msel = "PA"
)

# }

Run the code above in your browser using DataLab