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 really don't understand
is this one:
X <- tcrossprod(Q * rep(d[p], each=nrow(Q)), Q)

This line is supposed to calculate the matrix product Q*D*Q^T, Q is an n by
m matrix and R is a diagonal n by n matrix. What does this mean?
I also don't understand the meaning of a cross product between matrices, I
only know it between vectors.

Thanks,
Barisdad.

	[[alternative HTML version deleted]]

