[R] QR decomposition and rank of a matrix

Alex Nu notulei at yahoo.com
Thu Jul 1 16:59:41 CEST 2004

 In summary.manova the qr decomposition of a NxN
 is calculated and for some cases is giving me
 a rank <  N.

 However, following suggestions of professor Ripley to

 calculate the rank of a Matrix 

On 7 Jun 2002, Brian Ripley wrote: 
> For a more reliable answer, look at the SVD 
> (function svd) and look at the
> singular values. For example (from lda.default)

    X.s <- svd(X, nu = 0)
    rank <- sum(X.s$d > tol * X.s$d[1])

I'm getting rrank = N,

 I wonder wether use this new method for
 calculating the rank inside the manova.R 

 I'd appreciate any suggestions.



More information about the R-help mailing list