fixDependence: Detect linear dependencies of one matrix on another
Description
Identifies columns of a matrix X2 which are linearly
dependent on columns of a matrix X1. Primarily of use in setting up
identifiability constraints for nested GAMs.
Usage
fixDependence(X1,X2,tol=.Machine$double.eps^.5)
Arguments
X1
A matrix.
X2
A matrix, the columns of which may be partially linearly
dependent on the columns of X1.
tol
The tolerance to use when assessing linear dependence.
Value
An array of the columns of X2 which are linearly dependent on
columns of X1. NULL if the two matrices are independent.
Details
The algorithm uses a simple approach based on QR decomposition: see
Wood (2006, section 4.10.2) for details.
References
Wood S.N. (2006) Generalized Additive Models: An Introduction with R. Chapman
and Hall/CRC Press.