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
aiFun(model = warcolak.mod, Dimnames = c("Va", "Vd", "Ve"), inverse = TRUE)
}
output <- c(7.3075921, 7.0635161, 12.3423380, 1.9539486, 2.7586340, 0.6626111)
aiFun(AI.vec = output, inverse = FALSE, Dimnames = c("Va", "Vd", "Ve"))
Run the code above in your browser using DataLab