Next: Multivariate Macros Help File Up: Mathematical Macros Help File Previous: printfactors()   Contents


qrdcomp(x) or qrdcomp(qr(x)), where x is a REAL matrix with no MISSING

Keywords: matrices, qr decomposition
qrdcomp(X) computes a QR decomposition without pivoting of M by N REAL
matrix X with no MISSING values.  It returns structure(q:Q,r:R), where
Q and R are REAL matrices satisfying X = Q %*% R.

When M >= N, Q is M by N orthonormal (Q' %*% Q = N by N identity
matrix) and R is N by N upper triangular.  When M < N, Q is M by M
orthonormal and R is M by N with the first M columns an upper
triangular matrix.

qrdcomp() also works with the output from function qr().  That is
qrdcomp(qr(X)) is the same as qrdcomp(X).

Note:  Computation of the QR decomposition without pivoting is not
reliable when X is not of full rank.

qrdcomp(X, pivot:T) or qrdcomp(qr(X, pivot:T)) a QR decomposition or X
with pivoting and return a structure(q:Q,r:R,pivot:J), where J is a
permutation of run(N), such that X[,J] = Q %*% R, where Q and R are as
before.  This usage is accurate even when X is not of full rank.

See also qr()

Gary Oehlert 2003-01-15