posmat: Coerce a Matrix to be Positive Definite

Description Usage Arguments Value Author(s) References Examples

Description

For a square matrix with an all-positive diagonal, elements are limited to 6 significant digits by rounding the diagonal and shrinking off diagonal elements toward zero. The off-diagonals are reduced by 3 percent as necessary until the determinant is positive.

Usage

1

Arguments

x

matrix with only positive diagonal elements

...

extra arguments, ignored

Value

matrix

Author(s)

Leonid Gibiansky, modified by Tim Bergsma

References

http://metrumrg.googlecode.com

Examples

1
2
posmat(matrix(c(10.00006,20.00006,-30,40),2,2))
posmat(matrix(rep(100,4),2,2))

metrumrg documentation built on May 2, 2019, 5:55 p.m.