Displaying 1 result from an estimated 1 matches for "amerlia".
Did you mean:
amelia
2012 Dec 05
1
Understanding svd usage and its necessity in generalized inverse calculation
...e Inverse function (aka Generalized Inverse)
## X: symmetric matrix
## tol: convergence requirement
mpinv <- function(X, tol = sqrt(.Machine$double.eps)) {
s <- svd(X)
e <- s$d
e[e > tol] <- 1/e[e > tol]
s$v %*% diag(e,nrow=length(e)) %*% t(s$u)
}
That is from the Amerlia package, which we like to use very much.
Basically, I wonder if I should use a customized generalized inverse
or svd calculator to make this faster.
Why bother, you ask? We have many people who do multiple imputation
for missing data and the psychologists are persuaded that they now
ought to col...