There's a function in the "Matrix" library called "nearPD", which I've
used on occasion to straighten out wonky correlation matrices. I believe
that the "Matrix" package is now part of the base R distribution, so all
you have to do is load it.

BTW, exactly what kind of data are you dealing with? A non-PD
correlation matrix is something of an odd beast, and from my experience
it only really happens if one of your variables is basically a linear
combination of other variables.

On Fri, 2010-04-16 at 06:49 -0500, Parodi, Pietro wrote:

> Hello,
>  
> does anybody know of any routine in R which calculates the nearest
> correlation matrix to a given target matrix which not positive-definite
> (e.g. methods by Rebonato and Jueckel, Higham, etc)? I've googled it but
> haven't found anything in R.
>  
> Thanks!
>  
> Pete 
>  
> 
> ______________________________________________________________________
> 
> For information pertaining to Willis' email confidentiality and monitoring policy, usage restrictions, or for specific company registration and regulatory status information, please visit http://www.willis.com/email_trailer.aspx
> 
> We are now able to offer our clients an encrypted email capability for secure communication purposes. If you wish to take advantage of this service or learn more about it, please let me know or contact your Client Advocate for full details.
> ______________________________________________________________________
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> R-SIG-Finance@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.
> 



	[[alternative HTML version deleted]]

