[R] Efficient testing for +ve definiteness

From: Makram Talih <talih_at_xena.hunter.cuny.edu>
Date: Thu 14 Jul 2005 - 05:27:19 EST


Dear R-users,

Is there a preferred method for testing whether a real symmetric matrix is positive definite? [modulo machine rounding errors.]

The obvious way of computing eigenvalues via "E <- eigen(A, symmetric=T, only.values=T)$values" and returning the result of "!any(E <= 0)" seems less efficient than going through the LU decomposition invoked in "determinant.matrix(A)" and checking the sign and (log) modulus of the determinant.

I suppose this has to do with the underlying C routines. Any thoughts or anecdotes?

Many Thanks,

Makram Talih

--
Makram Talih, Ph.D.
Assistant Professor
Department of Mathematics and Statistics
Hunter College of the City University of New York
695 Park Avenue, Room 905 HE
New York, NY 10021

Website: http://stat.hunter.cuny.edu/talih
E-mail: makram.talih@hunter.cuny.edu
Tel: 212-772-5308
Fax: 212-772-4858

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Thu Jul 14 05:47:20 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:38 EST