Evaluates the standard bivariate normal (Gaussian) kernel function at specified values.
Usage
KBivN(X)
Arguments
X
A numeric vector of length 2 or a data frame with 2 columns.
Value
A single numeric value if X is a vector, or nrow(X) values if X is a data frame, giving the result of the standard bivariate normal kernel at the specified coordinate(s).
Details
If X is a vector of length 2, then the two components X[1] and X[2] are taken to be the x and y coordinates respectively. For multiple evaluations at differing coordinates, X must be a data frame with X[,1] and X[,2] as the corresponding pairs of x and y coordinates respectively.
KBivN(c(0.1,0.4))
x <- y <- seq(-4,4,length=50)
z <- KBivN(data.frame(cbind(sort(rep(x,50)),rep(y,50))))
persp(x,y,matrix(z,50,50,byrow=TRUE),main="bivariate Gaussian kernel",
phi=30,theta=-30)