rustiefel {rstiefel} | R Documentation |
Siumlate a Uniformly Distributed Random Orthonormal Matrix
Description
Siumlate a random orthonormal matrix from the uniform distribution on the Stiefel manifold.
Usage
rustiefel(m, R)
Arguments
m |
the length of each column vector. |
R |
the number of column vectors. |
Value
an m*R
orthonormal matrix.
Author(s)
Peter Hoff
References
Hoff(2007)
Examples
## The function is currently defined as
function (m, R)
{
X <- matrix(rnorm(m * R), m, R)
tmp <- eigen(t(X) %*% X)
X %*% (tmp$vec %*% sqrt(diag(1/tmp$val, nrow = R)) %*% t(tmp$vec))
}
[Package rstiefel version 1.0.1 Index]