| projections {lspls} | R Documentation |
Functions to project one matrix onto another, or to ortghogonalise it against the other.
project(M, N) orth(M, N) Corth(M, N)
M |
matrix to be projected or orthogonalised |
N |
matrix to be projected onto or orthogonalised against |
project(M, N) calculates the projection of M onto N,
i.e., N (N' N)^(-1) N' M.
orth(M, N) orthogonalises M with respect to N,
i.e., it calculates the projection of M onto the orthogonal
space of N: M - N (N' N)^(-1) N' M.
Corth(M, N) calculates the coefficient matrix needed to
orthogonalise future matrices, i.e.,
(N' N)^(-1) N' M. Future
matrices m and n can be orthogonalised with
m - n %*% Corth(M, N).
A matrix.
The functions need to be opitmised, both for speed and numerical accurracy.
Bjørn-Helge Mevik
##FIXME