Skip to contents

One call for what an evaluation is for. ebv() returns a named vector and accuracy() returns another; joining them by name is work the caller should not be doing.

Usage

solutions(fit, pedigree = NULL, group = NULL, trait = NULL)

Arguments

fit

result of model(), model_mt(), model_ar1(), model_threshold(), model_survival() or snp_blup()

pedigree

the SAME pedigree the fit was built on. Needed for the accuracy of a group with a pedigree term (animal(), sire(), maternal(), indirect(), a single step), whose prior variance is 1 + F of each animal: without it that group gets no accuracy column. A group of kernel() terms, of iid terms, or of a term fitted with a declared k_inverse = carries its own prior variance and gets the column without it (see accuracy()), in a multi-trait fit only when trait = is given, because the accuracy is per trait. A snp_blup() fit has no PEV (it solves by conjugate gradients) and takes no pedigree; for model_survival() the accuracy is on the log-hazard scale, from the Laplace PEV of the frailty

group

covariance group; by default the group of the direct genetic term: the first pedigree or genomic term that is not maternal() or indirect(), else the first kernel() with an estimated variance over the animals (most of its levels are animals of the pedigree, or there is no pedigree term), else the first maternal() term, else the first other kernel() with an estimated variance, else the first group; the same default in ebv(), solutions(), accuracy(), h2() and h2_curve()

trait

for a multi-trait fit (model_mt(), or model_ar1() with cbind()), which trait. Without it the table lists every trait, with ids written "level|trait", and has no acc column; given a pedigree but no trait =, the call stops and asks for one, as accuracy() does

Value

a data.frame with one row per level of the group: id, ebv, se (the square root of the PEV, absent when the fitter does not produce PEV) and acc, when pedigree is given or the group needs none (see pedigree and trait). Sorted by ebv, descending, which is the order the table is read in. A group with more than one effect per level (direct and maternal, direct and indirect, two correlated iid terms, the coefficients of a reaction norm) lists each level once per effect, and a term column after id says which effect the row belongs to, named as in the components (animal, maternal, rn[0], rn[1]); se and acc are the ones of that effect. A group with one effect per level has no term column. A group whose precision has latent levels besides the animals, kernel(id, Kinv = dominance_inverse(ped)), has a type column after id (and term), "animal", "subclass" or "ancestral", and lists the animals first, each type sorted by ebv: the dominance deviations of the animals are ranked among themselves, not among the sire x dam effects. When the fit warned that its records form blocks with no genetic link between them, whose difference the fixed effects absorb (see pedigree in model()), a block column gives the block of each animal (1 is the block with the most records): breeding values compare only within a block.

See also

ebv() and accuracy() for the pieces, h2() for the ratio