pin {nadiv} | R Documentation |
This function is similar to the pin calculations performed by the standalone ASReml. This function, written by Ian White, applies the delta method for the estimation of approximate standard errors on linear functions of variance components from a REML mixed model
pin(object, transform)
object |
A list with at least the following elements: |
transform |
A formula specifying the linear transformation of variance components to conduct |
Object is intended to be an asreml-R model output.
The formula can use V1,..., Vn
to specify any one of the n
variance components. These should be in the same order as they are in the
object (e.g., see the row order of summary(object)$varcomp
for
asreml-R models.
A data.frame
with row names corresponding to the operator on
the left hand side of the transform
formula and the entries
corresponding to the Estimate
and approximate SE
of the
linear transformation.
Ian White
# Below is the heritability calculation for tait1 of the warcolak dataset # Re-create the output from a basic, univariate animal model in asreml-R asrMod <- list(gammas = c(0.6383285, 1.00), gammas.type = c(2, 1), ai = c(0.0044461106, -0.0011754947, 0.0004424668)) namevec <- c("ped(ID)!ped", "R!variance") names(asrMod[[1]]) <- names(asrMod[[2]]) <- namevec nadiv:::pin(asrMod, h2 ~ V1 / (V1 + V2))