0

I am trying to use multivariate normal distribution in R by using library MASS and function dmvnorm. I have vectors:

Y = c(26.385112, 17.108580, 11.907650,  4.737202)
Mu = c(31.19789, 30.33983, 29.48177, 28.62371)

And covariance matrix:

> Sigma
           [,1]      [,2]      [,3]      [,4]
[1,]  10.861298 -3.910141  -9.40906 -14.90798
[2,]  -3.910141 24.890056  35.14521  54.67289
[3,]  -9.409060 35.145213  88.97201 124.25376
[4,] -14.907979 54.672890 124.25376 203.10715

> dput(Sigma)
structure(c(10.8612978825767, -3.91014077427266, -9.4090596651869, 
-14.9079785561011, -3.91014077427266, 24.8900558453267, 35.1452129330559, 
54.6728897867201, -9.4090596651869, 35.1452129330559, 88.9720052972337, 
124.253758129541, -14.9079785561011, 54.6728897867201, 124.253758129541, 
203.107146238298), .Dim = c(4L, 4L))

So, when I applied the dmvnorm, I just get one density which it assumes to give 4 densities one for each value.

dmvnorm(Y,mean=Mu,Sigma)
[1] 2.756653e-07

Or, Am I wrong? If not, could you please help me?

R. Saeiti
  • 89
  • 3
  • 11

0 Answers0