makeA: Calculates the Pedigree-based Additive Relationship Matrix

View source: R/makeA.R

makeAR Documentation

Calculates the Pedigree-based Additive Relationship Matrix

Description

Calculates the the Pedigree-based Additive Relationship Matrix. This is twice the pedigree based kinship matrix.

Usage

makeA(Pedig, keep.only=NULL, keep=keep.only, AFounder=NULL)

Arguments

Pedig

Data frame containing the Pedigree. The data frame has columns (1) Individual, (2) Sire, (3) Dam. Missing parents are coded as NA. Both parents must either be missing or present. If this is not the case use prePed.

keep

If keep is provided then kinships are computed only for these animals and their ancestors.

keep.only

If keep.only is provided then kinships are computed only for these animals.

AFounder

Additive relationship matrix of the founders. The row names are the ids of the founders. By default, founders are assumed to be unrelated. Founders not included in this matrix are also assumed to be unrelated.

Details

Computation of pedigree based additive relationship matrix A which is twice the kinship matrix. For individuals i and j it is defined as

Aij = 2*(Probability that two alleles chosen from individuals i and j are IBD).

Value

Additive relationship matrix.

Author(s)

Robin Wellmann

Examples

data(PedigWithErrors)
data(Phen)
Pedig <- prePed(PedigWithErrors)
keep  <- Pedig$Indiv[summary(Pedig)$equiGen>5 & Pedig$Indiv %in% Phen$Indiv]
A     <- makeA(Pedig, keep.only=keep)
A[1:3,1:3]

optiSel documentation built on May 31, 2023, 6:50 p.m.