bvdist-t2d: Bivariate Student-t Distribution

bvdist-t2dR Documentation

Bivariate Student-t Distribution

Description

Density, distribution function, and random generation for the bivariate Student-t distribution.

Usage

dt2d(x, y, rho = 0, nu = 4)
pt2d(x, y, rho = 0, nu = 4)
rt2d(n, rho = 0, nu = 4)

Arguments

n

the number of random deviates to be generated, an integer value.

nu

the number of degrees of freedom, a numeric value ranging between two and infinity, by default four.

rho

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

x, y

two numeric vectors defining the x and y coordinates.

Value

pt2d
returns a two column matrix of probabilities for the bivariate Student-t distribution function.

dt2d
returns a two column matrix of densities for the bivariate Student-t distribution function.

rt2d
returns a two column matrix of random deviates generated from the bivariate Student-t 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

## dt2d -
   # Bivariate Student-t Density:
   x <- (-40:40)/10
   X <- grid2d(x)
   z <- dt2d(X$x, X$y, rho = 0.5, nu = 6)
   Z <- list(x = x, y = x, z = matrix(z, ncol = length(x)))
   # Perspective Plot:
   persp(Z, theta = -40, phi = 30, col = "steelblue")
   # Contour Plot:
   contour(Z)
   
## pt2d -
   # Bivariate Student-t Probability:
   x <- (-40:40)/10
   X <- grid2d(x)
   z <- pt2d(X$x, X$y, rho = 0.5, nu = 6)
   Z <- list(x = x, y = x, z = matrix(z, ncol = length(x)))
   # Image Plot with Contours:
   image(Z)
   contour(Z, add=TRUE)

fMultivar documentation built on July 9, 2023, 3:08 p.m.