Learn R Programming

pedigree (version 1.4)

blup: Function to calculate breeding values using an animal model

Description

Fit an animal model to data, use a given variance ratio ($\alpha = \frac{\sigma^2_e}{\sigma^ 2_a}$). Calculate inverse of the additive genetic relationship matrix using function makeInv() of this package.

Usage

blup(formula, ped, alpha,trim = FALSE)

Arguments

formula
formula of the model, do not include the random effect due to animal (generally ID).
ped
data.frame with columns corresponding to ID, SIRE, DAM and the columns in the formula.
alpha
Variance ratio ($\frac{\sigma^2_e}{\sigma^ 2_a}$).
trim
If TRUE, trims the pedigree using the available phenotype data using function trimPed.

Value

Vector of solutions to the model, including random animal effects.

See Also

SamplePedigree, gblup, makeAinv,blup

Examples

Run this code
example(gblup)
sol <- blup(P~1,ped = ped,alpha = 1/h2 - 1)

Run the code above in your browser using DataLab