Learn R Programming

mgcv (version 0.9-6)

QT: QT factorisation of a matrix

Description

If $\bf A$ is an $r \times c$ matrix, where $r

Usage

QT(A)

Arguments

A
is an Rmatrix having more columns than rows

Value

  • The returned matrix $\bf R$, say, is of the same dimension as the input matrix $\bf A$. Each of its rows contains a vector, ${\bf u}_i$, defining one Householder rotation, ${\bf H}_i =({\bf I} - {\bf u}_i {\bf u}_i^\prime)$. The orthogonal matrix $\bf Q$ is defined by: ${\bf Q}={\bf H}_1 {\bf H}_2 \ldots {\bf H}_r$.

Details

This function is primarily useful for providing the null space of the linear constraint matrix $\bf C$, from the linear constraints ${\bf Cp} = {\bf 0}$, as a series of Householder rotations of the form used internally by mgcv(). It does not need to be called to set up a problem for solution by mgcv.

References

Gill, Murray and Wright (1981) Practical Optimization, AcademicPress

Examples

Run this code
set.seed(0)
y<-rnorm(12,1,1)
A<-matrix(y,2,6)
B<-QT(A)

Run the code above in your browser using DataLab