Learn R Programming

LDRTools (version 0.2)

B2P: Function to Compute an Orthogonal Projection Matrix Based on an Arbitrary Matrix

Description

Function to compute an orthogonal projection matrix based on an arbitrary matrix.

Usage

B2P(x)

Arguments

x
A matrix with p rows and k columns.

Value

Details

The orthogonal projection matrix $P$ corresponding to matrix $x$ is defined as $P=x (x^T x)^-1 x^T$.

See Also

O2P

Examples

Run this code
set.seed(1)
X <- matrix(rnorm(30),ncol=3)
P <- B2P(X)

Run the code above in your browser using DataLab