additive_genetic_animal: Build an additive-genetic animal model

Description Usage Arguments Details Value Examples

View source: R/genetic.R

Description

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

Usage

1
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

1
2
3
4
5
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 Sept. 6, 2021, 4:50 a.m.