proj: Projection matrix onto the column space

Description Usage Arguments Details Value

Description

This function assumes X has full column rank, and returns the projection matrix onto the column space of X.

Usage

1
proj(X)

Arguments

X,

a matrix with full column rank, can be an empty matrix with ncol(X) == 0.

Details

The projection matrix onto the column space of X can be written as

X(X^TX)^{-1}X^T.

When X is an empty matrix, then this function returns the zero matrix.

Value

This function returns the desired square matrix with dimension nrow(X).


shuxiaoc/outference documentation built on July 8, 2019, 8:30 p.m.