Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

Rrank

Find rank of upper triangular matrix


Description

Finds rank of upper triangular matrix R, by estimating condition number of upper rank by rank block, and reducing rank until this is acceptably low. Assumes R has been computed by a method that uses pivoting, usually pivoted QR or Choleski.

Usage

Rrank(R,tol=.Machine$double.eps^.9)

Arguments

R

An upper triangular matrix, obtained by pivoted QR or pivoted Choleski.

tol

the tolerance to use for judging rank.

Details

The method is based on Cline et al. (1979) as described in Golub and van Loan (1996).

Author(s)

References

Cline, A.K., C.B. Moler, G.W. Stewart and J.H. Wilkinson (1979) An estimate for the condition number of a matrix. SIAM J. Num. Anal. 16, 368-375

Golub, G.H, and C.F. van Loan (1996) Matrix Computations 3rd ed. Johns Hopkins University Press, Baltimore.

Examples

set.seed(0)
  n <- 10;p <- 5
  X <- matrix(runif(n*(p-1)),n,p)
  qrx <- qr(X,LAPACK=TRUE)
  Rrank(qr.R(qrx))

mgcv

Mixed GAM Computation Vehicle with Automatic Smoothness Estimation

v1.8-35
GPL (>= 2)
Authors
Simon Wood <simon.wood@r-project.org>
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.