[R] Error "system is computationally singular" by using function dmvnorm

Uwe Ligges ligges at statistik.tu-dortmund.de
Thu Nov 19 18:44:49 CET 2009



Alla Bulashevska wrote:
> Dear R users,
> i try to use function dmvnorm(x, mean, sigma, log=FALSE)
> from R package mvtnorm to calculate the probability of x
> under the multivariate normal distribution with mean equal
> to mean and covariance matrix sigma.
> I become the following 
> Error in solve.default(cov, ...) :
>   system is computationally singular: reciprocal condition
> number = 1.81093e-19


Probably your sigma is almost singular and can't be inverted in the 
calculation of the Mahalanobis distance.

Uwe Ligges




> 
> What could be the reason of it?
> Thank you in Advance,
> Alla.
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.




More information about the R-help mailing list