Learn R Programming

optiSel (version 0.9.1)

kinwac: Calculates Kinships With Age Cohorts

Description

Calculates for every individual it's mean kinship with the age cohort to which it belongs (excluding the kinship with itself).

Usage

kinwac(K, Pedig)

Arguments

K

Named list containing kinship matrices of the individuals to be used for computing mean kinships. Typically only individuals from the breed of interest are included.

Pedig

Data frame containing the Pedigree. The data frame has columns (1) Individual, (2) Sire, (3) Dam, and column Born containing for every individual the age cohort to which it belongs (typically year of birth).

Value

A data frame with column names c("cohort", "I", names(K)) containing for every individual and every matrix provided in K the average value of the individual with the birth cohort to which it belongs.

The data frame has class attribute "kinwac".

Details

The function computes for every individual it's mean kinship with the age cohort to which it belongs. This can be computed for different notions of kinship simultaneously. If an individual has high kinship with it's age cohort then it should not be extensively used for breeding if the aim is to conserve genetic diversity.

Examples

Run this code
# NOT RUN {
data(ExamplePed)
Pedig    <- prePed(ExamplePed, thisBreed="Hinterwaelder", lastNative=1970)
Kinships <- kinlist(pedIBD=pedIBD(Pedig), pedIBDatN=pedIBDatN(Pedig, thisBreed="Hinterwaelder"))
Kin      <- kinwac(Kinships, Pedig=Pedig)
Kin[1001:1010,]
# }

Run the code above in your browser using DataLab