Re: [R] need help in understanding R code, and maybe some math

2010-05-23 Thread Douglas Bates
On Sun, May 23, 2010 at 5:09 AM, Peter Ehlers wrote: > On 2010-05-23 0:56, john smith wrote: >> >> Hi, >> I am trying to implement Higham's algorithm for correcting a non positive >> definite covariance matrix. >> I found this code in R: >> >> http://projects.cs.kent.ac.uk/projects/cxxr/trac/brows

Re: [R] need help in understanding R code, and maybe some math

2010-05-23 Thread Peter Ehlers
On 2010-05-23 0:56, john smith wrote: Hi, I am trying to implement Higham's algorithm for correcting a non positive definite covariance matrix. I found this code in R: http://projects.cs.kent.ac.uk/projects/cxxr/trac/browser/trunk/src/library/Recommended/Matrix/R/nearPD.R?rev=637 I managed to un

[R] need help in understanding R code, and maybe some math

2010-05-22 Thread john smith
Hi, I am trying to implement Higham's algorithm for correcting a non positive definite covariance matrix. I found this code in R: http://projects.cs.kent.ac.uk/projects/cxxr/trac/browser/trunk/src/library/Recommended/Matrix/R/nearPD.R?rev=637 I managed to understand most of it, the only line I rea