O2P: Function to Compute an Orthogonal Projection Matrix Based on...

View source: R/O2P.R

O2PR Documentation

Function to Compute an Orthogonal Projection Matrix Based on a Matrix with Orthonormal Columns

Description

Function to compute an orthogonal projection matrix based on a matrix with orthonormal columns.

Usage

O2P(x)

Arguments

x

a matrix with k orthonormal columns of length p.

Details

The orthogonal projection matrix P corresponding to matrix x is defined as P=xx^{T}.

Value

The resulting orthogonal projection matrix.

Author(s)

Klaus Nordhausen

See Also

B2P

Examples

X <- tcrossprod(matrix(rnorm(100),ncol=10))
# Orthogonal projector based on the first three eigenvectors of X
P <- O2P(eigen(X)$vectors[,1:3])

LDRTools documentation built on Sept. 18, 2023, 1:06 a.m.