Displaying 3 results from an estimated 3 matches for "dnorm2d".
2010 Feb 20
1
Add lines (contours) to lattice wireframe plot
Hi,
I draw a surface corresponding to bivariate density of independent
variables (rho=0) using persp(). Then I add a contour line (i.e.,
circle in my case) at a particular density. Below is a minimal example
of what I have so far.
# Bivariate density
dnorm2d <- function(x, y, rho = 0) {
xoy = (x^2 - 2 * rho * x * y + y^2)/(2 * (1 - rho^2))
density = exp(-xoy)/(2 * pi * sqrt(1 - rho^2))
density
}
# Variables
x <- seq(from = -3, to = 3, length = 40)
y <- seq(from = -3, to = 3, length = 40)
z <- outer(X = x, Y = y, FUN = dnorm2d)
# Persp...
2012 Feb 15
3
(sin asunto)
Hola
Alguien me podrĂa decir como hacer una grafica
del tipo persp() de la densidad de una distribucion
normal bivariante estandarzada con correlacion 0.5??
gracias
[[alternative HTML version deleted]]
2008 Sep 17
0
fMultivar functions not loading under R-2.7
...e available functions for fMultivar
> listFunctions(fMultivar)
[1] "contour.gridData" "dcauchy2d" "delliptical2d"
[4] ".delliptical2dSlider" "density2d" "dmvsnorm"
[7] "dmvst" "dnorm2d" ".dnorm2d"
[10] "dt2d" ".First.lib" ".gfunc2d"
[13] "grid2d" "gridData" "hexBinning"
[16] "hist2d" "integrate2d" &q...