additive_genetic_animal: Build an additive-genetic animal model

View source: R/genetic.R

additive_genetic_animalR Documentation

Build an additive-genetic animal model

Description

Given a pedigree, and an index vector of observations, build and additive_genetic_animal model.

Usage

additive_genetic_animal(pedigree, idx)

Arguments

pedigree

object of class 'pedigree'

idx

integer vector of observed individuals (in the original codification)

Details

idx must hold the index of observed individuals in the original codification. If recoding took place when building the pedigree, this function will convert the codes internally.

Value

A list with elements pedigree, incidence.matrix, structure.matrix and structure.type, which is a string indicating either covariance or precision.

Examples

dat <- data.frame(id = 1:4,
                  sire = c(11, 11, 2, 3),
                  dam  = c(12, NA, 1, 12))
ped <- build_pedigree(1:3, data = dat)
breedR:::additive_genetic_animal(ped, dat$id)

famuvie/breedR documentation built on Aug. 6, 2024, 9:10 p.m.