[R] problem understanding the result of pnorm2d()

jass at in.gr jass at in.gr
Tue Feb 24 11:01:14 CET 2009

Hi all,

I am using the fMultivar package for calculating probabilities of bivariate normal distribution. I use the manual's example to understand what is going on, but let's take it for smaller dimensions of x and y: 

## Bivariate Normal Density:
x = c(0.3,10)
y = c(-10,0.2)
X = grid2d(x,y)
z = pnorm2d(X$x, X$y, rho = 0.5)
Z = list(x = x, y = y, z = matrix(z, ncol = length(x)))
persp(Z, theta = -40, phi = 30, col = "steelblue") 

What does the grid2d() command do?
In the Z- result in the matrix, I really cannot figure out where the 4 probabilities are referring to. Can anyone enlighten me?
Thank you for your time!


More information about the R-help mailing list