bvdist-cauchy2d: Bivariate Cauchy Distribution

Description Usage Arguments Value Author(s) References Examples

Description

Density, distribution function, and random generation for the bivariate Cauchy distribution.

Usage

1
2
3
dcauchy2d(x, y, rho = 0)
pcauchy2d(x, y, rho = 0)
rcauchy2d(n, rho = 0)

Arguments

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.

Value

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.

Author(s)

Adelchi Azzalini for the underlying pnorm2d function,
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
## 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)

Example output

Loading required package: timeDate
Loading required package: timeSeries
Loading required package: fBasics


Rmetrics Package fBasics
Analysing Markets and calculating Basic Statistics
Copyright (C) 2005-2014 Rmetrics Association Zurich
Educational Software for Financial Engineering and Computational Science
Rmetrics is free software and comes with ABSOLUTELY NO WARRANTY.
https://www.rmetrics.org --- Mail to: info@rmetrics.org


Rmetrics Package fMultivar
Analysing and Modeling Multivariate Financial Return Distributions
Copyright (C) 2005-2014 Rmetrics Association Zurich
Educational Software for Financial Engineering and Computational Science
Rmetrics is free software and comes with ABSOLUTELY NO WARRANTY.
https://www.rmetrics.org --- Mail to: info@rmetrics.org

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