Learn R Programming

mclust (version 5.4.6)

randomOrthogonalMatrix: Random orthogonal matrix

Description

Generate a random orthogonal basis matrix of dimension \((n x d)\) using the method in Heiberger (1978).

Usage

randomOrthogonalMatrix(n, d)

Arguments

n

the number of rows of the resulting orthogonal matrix.

d

the number of columns of the resulting orthogonal matrix.

Value

An orthogonal matrix of dimension \(n x d\) such that each column is orthogonal to the other and has unit lenght.

References

Heiberger R. (1978) Generation of random orthogonal matrices. Journal of the Royal Statistical Society. Series C (Applied Statistics), 27(2), 199-206.

See Also

coordProj

Examples

Run this code
# NOT RUN {
B <- randomOrthogonalMatrix(10,3)
zapsmall(crossprod(B))
# }

Run the code above in your browser using DataLab