qr2: QR Decomposition.

View source: R/basic_tensor.R

qr2R Documentation

QR Decomposition.

Description

QR decomposition, constraining the R matrix to have non-negative diagonal entries.

Usage

qr2(X)

Arguments

X

A matrix of dimension n by p where n ≥ p

Details

This function is almost a wrapper for qr(), qr.R(), and qr.Q(), except it constrains the diagonal elements of R to be non-negative. If X is full rank with fewer columns than rows, then this is sufficient to gaurantee uniqueness of the QR decomposition (Proposition 5.2 of Eaton (1983)).

Value

Q An n by p matrix with orthonormal columns.

R A p by p upper-triangular matrix with non-negative diagonal elements.

Author(s)

David Gerard.

See Also

qr, qr.Q, and qr.R for the base methods on the obtaining the QR decomposition. lq for the related LQ decomposition.


dcgerard/tensr documentation built on Oct. 4, 2022, 5:58 p.m.