bvdist-elliptical2d: Bivariate Elliptical Densities

Description Usage Arguments Value Author(s) References Examples

Description

Density function for bivariate elliptical distributions.

Usage

1
2
delliptical2d(x, y, rho = 0, param = NULL, type = c("norm", "cauchy", "t", 
    "logistic", "laplace", "kotz", "epower"), output = c("vector", "list"))

Arguments

x, y

two numeric vectors defining the x and y coordinates.

output

output - a character string specifying how the output should be formatted. By default a vector of the same length as u and v. If specified as "list" then u and v are expected to span a two-dimensional grid as outputted by the function grid2d and the function returns a list with elements $x, y, and z which can be directly used for example by 2D plotting functions.

param

additional parameters to specify the bivariate density function. Only effective for the Kotz and Exponential Power distribution. For the Kotz distribution we can specify a numeric value, by default defined as param=c(r=sqrt(2)), and for the Exponential Power distribution a numeric vector, by default defined as param=c(r=sqrt(2)),s=1/2.

rho

the correlation parameter, a numeric value ranging between minus one and one, by default zero.

type

the type of the elliptical copula. A character string selected from: "norm", "cauchy", "t", "laplace", "kotz", or "epower".

Value

delliptical2d
returns a two column matrix of densities for the selected bivariate elliptical distribution function.

Author(s)

Diethelm Wuertz for the Rmetrics R-port.

References

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.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## delliptical2d -
   # Kotz' Elliptical Density:
   x <- (-40:40)/10
   X <- grid2d(x)
   z <- delliptical2d(X$x, X$y, rho = 0.5, type = "kotz")
   Z <- list(x = x, y = x, z = matrix(z, ncol = length(x)))
   
## Perspective Plot:
   persp(Z, theta = -40, phi = 30, col = "steelblue")
   
## Image Plot with Contours:
   image(Z, main = "Bivariate Kotz")
   contour(Z, add=TRUE)
   
## Internal Density Slider:
   ## Not run: 
   .delliptical2dSlider()
   
## End(Not run)

fMultivar documentation built on March 13, 2020, 3:06 a.m.