Solve: Solve System of Linear Equations using Inverse of... In VCA: Variance Component Analysis

Description

Function solves a system of linear equations, respectively, inverts a matrix by means of the inverse Cholesky-root.

Usage

 `1` ```Solve(X, quiet = FALSE) ```

Arguments

 `X` (matrix, Matrix) object to be inverted `quiet` (logical) TRUE = will suppress any warning, which will be issued otherwise

Details

This function is intended to reduce the computational time in function `solveMME` which computes the inverse of the square variance- covariance Matrix of observations. It is considerably faster than function `solve` (see example). Whenever an error occurs, which is the case for non positive definite matrices 'X', function `MPinv` is called automatically yielding a generalized inverse (Moore-Penrose inverse) of 'X'.

Value

(matrix, Matrix) corresponding to the inverse of X

Author(s)

Andre Schuetzenmeister [email protected]

Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16``` ```## Not run: # following complex (nonsense) model takes pretty long to fit system.time(res.sw <- anovaVCA(y~(sample+lot+device)/day/run, VCAdata1)) # solve mixed model equations (not automatically done to be more efficient) system.time(res.sw <- solveMME(res.sw)) # extract covariance matrix of observations V V1 <- getMat(res.sw, "V") V2 <- as.matrix(V1) system.time(V2i <- solve(V2)) system.time(V1i <- VCA:::Solve(V1)) V1i <- as.matrix(V1i) dimnames(V1i) <- NULL dimnames(V2i) <- NULL all.equal(V1i, V2i) ## End(Not run) ```

VCA documentation built on July 12, 2017, 5:02 p.m.