### Name: posdef.approx
### Title: Find the Nearest Positive Definite Matrix
### Aliases: posdef.approx
### Keywords: multivariate

### ** Examples

## most likely generates a matrix which is close to positive definite
## but not quite
s <- matrix(rnorm(100), ncol=5)
S <- (t(s) %*% s) + matrix(rnorm(25, sd=10), ncol=5)
S

## a correction, quiet=TRUE so there is no warning printed
posdef.approx(S, quiet=TRUE)



