Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

transformConstraints

transformConstraints


Description

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.

Usage

transformConstraints(list0,value=1)

Arguments

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.

Value

$res

a list with the modified constraint matrices.

Author(s)

Giovanny Covarrubias-Pazaran

References

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

See Also

The function vs to know how to use transformConstraints in the mmer solver.

Examples

(a <- list(unsm(4), diag(4)))
transformConstraints(a, value=3)

sommer

Solving Mixed Model Equations in R

v4.1.3
GPL (>= 2)
Authors
Giovanny Covarrubias-Pazaran
Initial release
2021-04-01

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.