Compute the symmetric square root of a matrix.
msqrt(M)
M
a positive semidefinite matrix.
Peter Hoff
S<-rWishart(1,5,diag(5))[,,1] S Sh<-msqrt(S) Sh%*%Sh