The R Project SVN R

Rev

Rev 61624 | Rev 64444 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 61624 Rev 62154
Line 20... Line 20...
20
    is to be computed.  Logical matrices are coerced to numeric.}
20
    is to be computed.  Logical matrices are coerced to numeric.}
21
  \item{nu}{the number of left  singular vectors to be computed.
21
  \item{nu}{the number of left  singular vectors to be computed.
22
    This must between \code{0} and \code{n = nrow(x)}.}
22
    This must between \code{0} and \code{n = nrow(x)}.}
23
  \item{nv}{the number of right singular vectors to be computed.
23
  \item{nv}{the number of right singular vectors to be computed.
24
    This must be between \code{0} and \code{p = ncol(x)}.}
24
    This must be between \code{0} and \code{p = ncol(x)}.}
25
  \item{LINPACK}{logical.  Defunct and ignored (with a warning for true values).}
25
  \item{LINPACK}{logical.  Defunct and ignored.}
26
}
26
}
27
\details{
27
\details{
28
  The singular value decomposition plays an important role in many
28
  The singular value decomposition plays an important role in many
29
  statistical techniques.  \code{svd} and \code{La.svd} provide two
29
  statistical techniques.  \code{svd} and \code{La.svd} provide two
30
  slightly different interfaces.
30
  slightly different interfaces.
Line 35... Line 35...
35
 
35
 
36
  Unsuccessful results from the underlying LAPACK code will result in an
36
  Unsuccessful results from the underlying LAPACK code will result in an
37
  error giving a positive error code (most often \code{1}): these can
37
  error giving a positive error code (most often \code{1}): these can
38
  only be interpreted by detailed study of the FORTRAN code but mean
38
  only be interpreted by detailed study of the FORTRAN code but mean
39
  that the algorithm failed to converge.
39
  that the algorithm failed to converge.
40
 
-
 
41
  The LINPACK interface is restricted to matrices \code{x} with less
-
 
42
  than \eqn{2^{31}}{2^31} elements.
-
 
43
}
40
}
44
\value{
41
\value{
45
  The SVD decomposition of the matrix as computed by LAPACK/LINPACK,
42
  The SVD decomposition of the matrix as computed by LAPACK,
46
  \deqn{ \bold{X = U D V'},} where \eqn{\bold{U}} and \eqn{\bold{V}} are
43
  \deqn{ \bold{X = U D V'},} where \eqn{\bold{U}} and \eqn{\bold{V}} are
47
  orthogonal, \eqn{\bold{V'}} means \emph{V transposed}, and
44
  orthogonal, \eqn{\bold{V'}} means \emph{V transposed}, and
48
  \eqn{\bold{D}} is a diagonal matrix with the singular
45
  \eqn{\bold{D}} is a diagonal matrix with the singular
49
  values \eqn{D_{ii}}{D[i,i]}.  Equivalently, \eqn{\bold{D = U' X V}},
46
  values \eqn{D_{ii}}{D[i,i]}.  Equivalently, \eqn{\bold{D = U' X V}},
50
  which is verified in the examples, below.
47
  which is verified in the examples, below.