bvdist-cauchy2d | R Documentation |
Density, distribution function, and random generation for the bivariate Cauchy distribution.
dcauchy2d(x, y, rho = 0)
pcauchy2d(x, y, rho = 0)
rcauchy2d(n, rho = 0)
x, y |
two numeric vectors defining the x and y coordinates. |
n |
the number of random deviates to be generated, an integer value. |
rho |
the correlation parameter, a numeric value ranging between minus one and one, by default zero. |
pcauchy2d
returns a two column matrix of probabilities for the bivariate
Cauchy distribution function.
dcauchy2d
returns a two column matrix of densities for the bivariate
Cauchy distribution function.
rcauchy2d
returns a two column matrix of random deviates generated from
the bivariate Cauchy distribution function.
Adelchi Azzalini for the underlying pnorm2d
function,
Diethelm Wuertz for the Rmetrics R-port.
Azzalini A., (2004); The sn Package; R Reference Guide available from www.r-project.org.
Venables W.N., Ripley B.D., (2002); Modern Applied Statistics with S, Fourth Edition, Springer.
## Bivariate Cauchy Density:
x <- (-40:40)/10
X <- grid2d(x)
z <- dcauchy2d(X$x, X$y, rho = 0.5)
Z <- list(x = x, y = x, z = matrix(z, ncol = length(x)))
## Perspective Density Plot:
persp(Z, theta = -40, phi = 30, col = "steelblue")
## Image Density Plot with Contours:
image(Z, main="Bivariate Cauchy")
contour(Z, add=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.