updown
Up- and Down-Dating a Cholesky Decomposition
Description
Compute the up- or down-dated Cholesky decomposition
Usage
updown(update, C, L)
Arguments
update | logical ( |
C | any R object, coercable to a sparse matrix (i.e., of subclass of |
L | a Cholesky factor, specifically, of class |
Value
an updated Cholesky factor, of the same dimension as L
. Typically of class "dCHMsimpl"
(a sub class of "CHMfactor"
).
Methods
signature(update = "character", C = "mMatrix", L = "CHMfactor")
-
..
signature(update = "logical", C = "mMatrix", L = "CHMfactor")
-
..
Author(s)
Contributed by Nicholas Nagle, University of Tennessee, Knoxville, USA
References
CHOLMOD manual, currently beginning of chapter~18. ...
See Also
Examples
dn <- list(LETTERS[1:3], letters[1:5]) ## pointer vectors can be used, and the (i,x) slots are sorted if necessary: m <- sparseMatrix(i = c(3,1, 3:2, 2:1), p= c(0:2, 4,4,6), x = 1:6, dimnames = dn) cA <- Cholesky(A <- crossprod(m) + Diagonal(5)) 166 * as(cA,"Matrix") ^ 2 uc1 <- updown("+", Diagonal(5), cA) ## Hmm: this loses positive definiteness: uc2 <- updown("-", 2*Diagonal(5), cA) image(show(as(cA, "Matrix"))) image(show(c2 <- as(uc2,"Matrix")))# severely negative entries ##--> Warning
Copyright (©) 1999–2012 R Foundation for Statistical Computing.
Licensed under the GNU General Public License.