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

2009-11-19 Thread Uwe Ligges



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@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.


__
R-help@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.


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

2009-11-18 Thread Alla Bulashevska

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

What could be the reason of it?
Thank you in Advance,
Alla.

__
R-help@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.


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

2009-11-18 Thread Ravi Varadhan
It means that your covariance matrix sigma is numerically singular.

Ravi.

---

Ravi Varadhan, Ph.D.

Assistant Professor, The Center on Aging and Health

Division of Geriatric Medicine and Gerontology 

Johns Hopkins University

Ph: (410) 502-2619

Fax: (410) 614-9625

Email: rvarad...@jhmi.edu

Webpage:
http://www.jhsph.edu/agingandhealth/People/Faculty_personal_pages/Varadhan.h
tml

 





-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Alla Bulashevska
Sent: Wednesday, November 18, 2009 9:11 AM
To: r-help@r-project.org
Subject: [R] Error system is computationally singular by using function
dmvnorm


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

What could be the reason of it?
Thank you in Advance,
Alla.

__
R-help@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.

__
R-help@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.