transformConstraints
transformConstraints
takes a list of matrices with constraints and transforms all the non-zero values to the value desired. The purpose of this function is to make easy the transformation of initial constraints to a fixed-constraint list to be provided to a mixed model fitted with the mmer function.
transformConstraints(list0,value=1)
list0 |
a list of matrices with constraints according to the rules specified in the vs function (0: not to be estimated, 1: positive, 2:unconstrained, 3:fixed). |
value |
value to be used to replace all the non-zero values in the constraint matrices. |
a list with the modified constraint matrices.
Giovanny Covarrubias-Pazaran
Covarrubias-Pazaran G (2016) Genome assisted prediction of quantitative traits using the R package sommer. PLoS ONE 11(6): doi:10.1371/journal.pone.0156744
(a <- list(unsm(4), diag(4))) transformConstraints(a, value=3)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.