[R] using SVD to get an inverse matrix of covariance matrix
jerome at hivnet.ubc.ca
Fri Jul 11 18:24:34 CEST 2003
If some of the eigenvalues of a square matrix are (close to) zero, then
it's inverse does not exist. However, you can always calculate it's
generalized inverse ginv().
It'll allow you to specify a "tol" argument:
tol: A relative tolerance to detect zero singular values.
Hope that helps,
On July 11, 2003 08:49 am, ge yreyt wrote:
> Content-Length: 2154
> Status: R
> X-Status: N
> Dear R-users,
> I have one question about using SVD to get an inverse
> matrix of covariance matrix
> Sometimes I met many singular values d are close to 0:
> look this example
> Since the inverse matrix = u * inverse(d) * v',
> If I calculate inverse d based on formula : 1/d, then
> most values of inverse matrix
> will be huge. This must be not a good way. MOre
> special case, if a single value is 0, then
> we can not calculate inverse d based on 1/d.
> Therefore, my question is how I can calculate inverse
> d (that is inverse diag(d) more efficiently???
> Post your free ad now! http://personals.yahoo.ca
> R-help at stat.math.ethz.ch mailing list
More information about the R-help