Learn R Programming

nadiv (version 2.17.0)

pin: Approximate standard errors for linear functions of variance components

Description

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

Usage

pin(object, transform)

Arguments

object

A list with at least the following elements: gammas, gammas.type, and ai from a REML mixed model

transform

A formula specifying the linear transformation of variance components to conduct

Value

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.

Details

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.

See Also

See Also as aiCI, aiFun

Examples

Run this code
# NOT RUN {
# 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))
# }

Run the code above in your browser using DataLab