# Re: [R] Need Advice on Matrix Not Positive Semi-Definite with cholesky decomposition

From: Gottlieb, Neil <ngottlieb_at_marinercapital.com>
Date: Wed, 01 Apr 2009 10:52:09 -0400

Hi Stephen:

It's the inputs given to me by a end-user. Ultimately trying to fit a student-t copula to a bunch of simulated price returns while maintaining the structure of the estimated correlation matrix.

The other challenge is I use R to test and work a solution but then have also done in matlab as I had to write a C# wrapper around the code for the end-user.

In a way I am stuck with Matalb but was hoping to try and solve with R which is great.

I appreciate your responding to my email help request.

Neil

From: stenka1_at_go.com [mailto:stenka1_at_go.com] Sent: Wednesday, April 01, 2009 10:47 AM To: Gottlieb, Neil; r-help_at_r-project.org Subject: Re: [R] Need Advice on Matrix Not Positive Semi-Definite with cholesky decomposition

Neil,

pls tell why do you need the correlation matrix? if you are trying to simulate correlated variables then you can go around the cholesky by using svd. if you really need the correlation ( I think it is always possible to avoid it ) then Rmetrics have a function to turn your matrix into positive semi-definite. you can also consider a factor model which will reduce the dimensionality tremendously.

Stephen C. Bond

On Apr 1, 2009, ngottlieb_at_marinercapital.com wrote:

Dear fellow R Users:

I am doing a Cholesky decomposition on a correlation matrix and get error message the matrix is not semi-definite.

Does anyone know:

1- a work around to this issue?
2- Is there any approach to try and figure out what vector might be co-linear with another in thr Matrix?
3- any way to perturb the data to work around this?

Thanks for any suggestions.

R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

[[alternative HTML version deleted]]

R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Wed 01 Apr 2009 - 13:55:29 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 01 Apr 2009 - 14:30:33 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.