Learn R Programming

nadiv (version 2.17.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)

Arguments

asr.object

Object from a call to asreml

Value

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

Examples

Run this code
# NOT RUN {
  
# }
# NOT RUN {
    library(asreml)
    ginvA <- asreml.Ainverse(warcolak)$ginv
    ginvD <- makeD(warcolak[,1:3])$listDinv
    warcolak$IDD <- warcolak$ID
    warcolak.mod <- asreml(trait1 ~ sex, random = ~ ped(ID) + giv(IDD), 
	ginverse = list(ID = ginvA, IDD = ginvD), data = warcolak) 
    summary(warcolak.mod)$varcomp
    sqrt(varTrans(warcolak.mod))  # sqrt() so can compare with standard errors from summary
   
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab