The R Project SVN R

Rev

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

Rev 23184 Rev 26327
Line 5... Line 5...
5
\description{
5
\description{
6
  Invert a symmetric, positive definite square matrix from its Choleski
6
  Invert a symmetric, positive definite square matrix from its Choleski
7
  decomposition.
7
  decomposition.
8
}
8
}
9
\usage{
9
\usage{
10
chol2inv(x, size = ncol(x), LINPACK = FALSE)
10
chol2inv(x, size = NCOL(x), LINPACK = FALSE)
11
La.chol2inv(x, size = ncol(x))
11
La.chol2inv(x, size = ncol(x))
12
}
12
}
13
\arguments{
13
\arguments{
14
  \item{x}{a matrix.  The first \code{nc} columns of the upper triangle
14
  \item{x}{a matrix.  The first \code{nc} columns of the upper triangle
15
    contain the Choleski decomposition of the matrix to be inverted.}
15
    contain the Choleski decomposition of the matrix to be inverted.}
Line 20... Line 20...
20
}
20
}
21
\value{
21
\value{
22
  The inverse of the decomposed matrix.
22
  The inverse of the decomposed matrix.
23
}
23
}
24
\details{
24
\details{
25
  \code{chol2inv(LINPACK=TRUE)} provides an interface to the LINPACK routine DPODI.
25
  \code{chol2inv(LINPACK=TRUE)} provides an interface to the LINPACK
-
 
26
  routine DPODI.
26
  \code{La.chol2inv} provides an interface to the LAPACK routine DPOTRI.
27
  \code{La.chol2inv} provides an interface to the LAPACK routine DPOTRI.
27
}
28
}
28
\references{
29
\references{
29
  Dongarra, J. J., Bunch, J. R., Moler, C. B. and Stewart, G. W. (1978)
30
  Dongarra, J. J., Bunch, J. R., Moler, C. B. and Stewart, G. W. (1978)
-
 
31
  \emph{LINPACK Users Guide}.
30
  \emph{LINPACK Users Guide}.  Philadelphia: SIAM Publications.
32
  Philadelphia: SIAM Publications.
31
 
33
 
32
  Anderson. E. and ten others (1999)
34
  Anderson. E. and ten others (1999)
33
  \emph{LAPACK Users' Guide}. Third Edition. SIAM.\cr
35
  \emph{LAPACK Users' Guide}. Third Edition.
-
 
36
  SIAM.
34
  Available on-line at
37
  Available on-line at
35
  \url{http://www.netlib.org/lapack/lug/lapack_lug.html}.
38
  \url{http://www.netlib.org/lapack/lug/lapack_lug.html}.
36
}
39
}
-
 
40
\seealso{
-
 
41
  \code{\link{chol}},
37
\seealso{\code{\link{chol}}, \code{\link{solve}}.}
42
  \code{\link{solve}}.
-
 
43
}
38
\examples{
44
\examples{
39
cma <- chol(ma  <- cbind(1, 1:3, c(1,3,7)))
45
cma <- chol(ma  <- cbind(1, 1:3, c(1,3,7)))
40
ma \%*\% chol2inv(cma)
46
ma \%*\% chol2inv(cma)
41
}
47
}
42
\keyword{algebra}
48
\keyword{algebra}