7
$\begingroup$

A little while back, J.M. suggested using the Stewart algorithm for generating $n$ by $n$ pseudo random orthogonal matrices in $O(n^2)$ time. He further noted that this methodology is implemented in Nick Higham's matrix computation toolbox (matlab). Now this package contains a bunch of .m files. Could anyone direct me to which one implements the pseudorandom orthogonal matrix generator? Alternatively, would anyone know of a R implementation of this algorithm?

$\endgroup$
9
$\begingroup$

It's in the Test Matrix Toolbox, not the Matrix Computation Toolbox. The M-file qmult.m (premultiplication by a Haar-distributed pseudorandom orthogonal matrix) can be found here or here.

$\endgroup$
  • $\begingroup$ Thanks alot (both for the clever initial suggestion and for the folow thru). $\endgroup$ – user603 Sep 23 '10 at 7:39
  • $\begingroup$ No problem, kwak; remember only that it does premultiplication, though modifying the algorithm to do postmultiplication shouldn't be too hard. $\endgroup$ – J. M. is not a statistician Sep 23 '10 at 11:45
  • $\begingroup$ M.:> it should be okay: i only need Q (i.e. qmult(eye(p))) $\endgroup$ – user603 Sep 23 '10 at 20:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.