Learn R Programming

nadiv (version 2.18.0)

varTrans: Transforms ASReml-R gamma sampling variances to component scale

Description

The inverse of the Average Information matrix in an ASReml-R object produces the sampling variances of the (co)variance components on the gamma scale. This function scales these variances to the original component scale. This allows for Confidence Intervals to be constructed about the variance component estimates.

Usage

varTrans(asr.object)

Value

Returns a numeric vector of variances for each variance component in an ASReml-R model.

Arguments

asr.object

Object from a call to asreml

Examples

Run this code

  if (FALSE) {
    library(asreml)
    ginvA <- ainverse(warcolak)
    ginvD <- makeD(warcolak[, 1:3])$listDinv
      attr(ginvD, "rowNames") <- as.character(warcolak[, 1])
      attr(ginvD, "INVERSE") <- TRUE
    warcolak$IDD <- warcolak$ID
    warcolak.mod <- asreml(trait1 ~ sex,
     random = ~ vm(ID, ginvA) + vm(IDD, ginvD), 
	data = warcolak) 
    summary(warcolak.mod)$varcomp
    sqrt(varTrans(warcolak.mod))  # sqrt() so can compare with standard errors from summary
   }

Run the code above in your browser using DataLab