dot-M: M Matrix

Description Usage Arguments Details Value Author(s) References See Also

Description

Calculates the residual maker matrix ≤ft( \mathbf{M} \right) using

\mathbf{M} = \mathbf{I} - \mathbf{P}

where

\mathbf{P} = \mathbf{X} ≤ft( \mathbf{X}^{T} \mathbf{X} \right)^{-1} \mathbf{X}^{T} .

The residual maker matrix ≤ft( \mathbf{M} \right) transforms the \mathbf{y} vector to the vector of residuals ≤ft( \mathbf{e} = \mathbf{My} \right) .

Usage

1
.M(X, P = NULL)

Arguments

X

n by k numeric matrix. The data matrix \mathbf{X} (also known as design matrix, model matrix or regressor matrix) is an n \times k matrix of n observations of k regressors, which includes a regressor whose value is 1 for each observation on the first column.

P

n by n numeric matrix. The n \times n projection matrix ≤ft( \mathbf{P} \right).

Details

If P = NULL, the P matrix is computed using P().

Value

Returns the residual maker matrix ≤ft( \mathbf{M} \right) .

Author(s)

Ivan Jacob Agaloos Pesigan

References

Wikipedia: Projection Matrix

See Also

Other projection matrix functions: .h(), M(), P(), h()


jeksterslabds/jeksterslabRlinreg documentation built on Jan. 7, 2021, 8:30 a.m.