The goal of bendR is to force symmetric non-positive-definite matrices to be positive-definite (PD).
In animal breeding, genetic parameters are obtained from literature or estimated in different analyses based on varying degrees of information. When combined in one covariance matrix, for example for breeding value estimation, in all likelihood it results in a non-PD matrix. This package provides weighted and unweighted methods to force a matrix to be PD.
You can install the development version of bendR from
GitHub with:
# install.packages("devtools")
devtools::install_github("tstev/bendR")Schaeffer, L. R. (2014). Making Covariance Matrices Positive Definite. https://animalbiosciences.uoguelph.ca/~lrs/ELARES/PDforce.pdf
Jorjani, H., Klei, L., & Emanuelson, U. (2003). A Simple Method for Weighted Bending of Genetic (Co)variance Matrices. Journal of Dairy Science, 86(2), 677–679. https://doi.org/10.3168/jds.S0022-0302(03)73646-7