Skip to contents

acc_i = sqrt(1 - PEV_i / (k_ii sigma2)), with the PEV coming from the diagonal of the selective inverse of the MME at the optimum, sigma2 the variance of the term and k_ii the PRIOR variance of level i at unit sigma2, the diagonal of the covariance matrix the term was fitted with. For a pedigree term that is 1 + F_i, and it matters: without it the accuracy of an inbred animal comes out underestimated, and in a closed nucleus that is everybody.

Usage

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

Arguments

fit

result of model() or model_mt()

pedigree

the same data.frame used in the fit. Only a group with a pedigree term reads it; for a group of iid terms it may be omitted. A term fitted with genotypes = is a pedigree term and needs it

group

covariance group; by default the group of the direct genetic term: the first pedigree or genomic term that is not maternal(), else the first maternal() term, else the first group; the same default in ebv(), solutions(), accuracy(), h2() and h2_curve()

trait

required in the multi-trait case (model_mt()): accuracy is per trait, with the corresponding var(term@trait)

Value

a numeric vector named by level, in the order of fit$pev[[group]]; a group with several scalar terms (direct-maternal) returns one block of levels per term, each scaled by its own variance.

Details

It is only defined for a group with ONE coefficient. In a reaction norm the accuracy of the intercept alone is misleading (the slope's is tiny and the total EBV's depends on the point of the gradient), so the error here tells you to combine the coefficients explicitly.

The prior variance is each level's own, read from the structure of its term and matched to the PEV by level NAME, never by position:

  • a pedigree term (animal(), sire(), maternal()): 1 + F from the pedigree. The pedigree must be the one the fit was given: the founders the fit added (ids of the data with no line) and its pruning to the animals of the data, the genotyped and their ancestors (see pedigree in model()) are redone here, so the animals are exactly the levels of the group. A pedigree with ancestors added or animals missing is refused (it would change the F of their descendants); lines that are not ancestors of any level are pruned, as in the fit. Its rows may come in any order. For a GENOTYPED animal in a single-step fit it is the diagonal of H, which in that block is the diagonal of G*, and that is a different number: on a simulated population of 510 animals, all genotyped, the two differ by up to 0.18, moving an individual accuracy by up to 0.067 (median 0.011). The herd average barely notices (0.6966 against 0.6964); what moves is the individual, and with it the ranking of genotyped animals by accuracy. The fit carries the genomic prior when it has one, in h_prior, named by genotyped animal.

  • an iid term (pe(), random()): 1.

A group with several scalar terms (direct-maternal, two correlated iid terms) is split into one block of levels per term, and each block is divided by its own variance. Every term of a group indexes the same levels: the pedigree, or, for terms without a relationship matrix (random(), pe()), the union of the level names of their columns. With 8 sires in one column and 16 dams in the other each block has the levels of both columns. A level that appears only in the other term's column has no record for this term, and its accuracy is what the group covariance carries over from the other term at the same level, 0 when that covariance is 0. A fit made before this version paired the levels of such a group by position; when its blocks do not carry the same level names it is refused, and it should be refitted either way.

THE STATE OF THE FIT. A fit that did not converge is read at its last iterate, with a warning. When the fit reports the information matrix SINGULAR along a set of components that includes a variance or covariance of the group, the PEV and the variance move together along that ridge and the accuracy of every level is returned as NA, with a warning naming the components; a fit with no estimates (theta NA, the start was inadmissible) gives NA too, saying so (it used to stop with "no component 'var(animal)'"). A fit at given components (start with maxiter = 0 and n_em = 0) is read at those components without a word. A PEV above the prior variance of its level beyond rounding gives accuracy 0 with a warning that counts those levels: the prior used is then not the one the level was fitted with, as for a non-genotyped animal of a single step (see above).

References

Henderson, C.R. (1975). Best linear unbiased estimation and prediction under a selection model. Biometrics 31:423-447.

Mrode, R.A. & Pocrnic, I. (2023). Linear Models for the Prediction of the Genetic Merit of Animals, 4th ed. CABI, ch. 3.