P {lazy.mat}R Documentation

Orthogonal Projection Operators to the Column Space of the Input

Description

Orthogonal Projection Operators to the Column Space of the Input

Usage

P(
  ...,
  Ginv = 0,
  Ginvargs = list(tol = .Machine$double.eps, MASS = 0, MP = 0, nopermute = 0, eps =
    1e-08, chkginv = 0, epsc = 1e-08)
)

Arguments

...

Input matrices:
The projection operator to the column space of the column binded matices will be calculated.

Ginv

= 1 to use Ginv function in lazy.mat package

Ginvargs

The list of arguments to Ginv function

Details

Let X be the colum binded ... matrices.
The the orthogonal projection operator to the column space of X is defined as
X %*% solve( t(X) %*% X ) %*% t(X) .
If X is not of full column rank, native solve function stops with error. In this case, use Ginv=1 in order to replace solve with Ginv function.

Examples

X <- demomat(3,2)
PX <- P(X)
PX1 <- P(rep(1,nrow(X)),X, Ginv=1)
PX-PX1
QX <- Q(X)
PX%*%QX


[Package lazy.mat version 0.1.4 Index]