Learn R Programming

lmreg (version 1.2)

supplbasis: Supplementary basis vectors for column space of a matrix

Description

Computes a basis which, together with a basis of some columns of a matrix, constitute a basis of the column space of the entire matrix.

Usage

supplbasis(A, B, tol=sqrt(.Machine$double.eps))

Arguments

A

Sub-matrix containing some columns of a matrix.

B

Sub-matrix containing remaining columns of same matrix.

tol

A relative tolerance to detect rank deficiency during qr decomposition (default = sqrt(.Machine$double.eps)).

Value

Returns a semi-orthogonal matrix whose columns, together with a basis of the column space of A, constitute a basis of the column space of the entire matrix (A:B).

References

Sengupta and Jammalamadaka (2019), Linear Models and Regression with R: An Integrated Approach.

Examples

Run this code
# NOT RUN {
A <- cbind(c(2,1,-2),c(3,1,-1))
B <- diag(c(1,1,0))
supplbasis(A,B)
# }

Run the code above in your browser using DataLab