grid2d
Creates from two vectors x-y grid coordinates,
density2d
returns 2D Kernel Density Estimates,
hist2d
returns 2D Histogram Counts,
integrate2d
integrates over a two dimensional unit square,
pnorm2d
computes bivariate normal distribution function,
dnorm2d
computes bivariate normal density function,
rnorm2d
generates bivariate normal random deviates,
pcauchy2d
computes bivariate Cauchy distribution function,
dcauchy2d
computes bivariate Cauchy density function,
rcauchy2d
generates bivariate Cauchy random deviates,
pt2d
computes bivariate Student-t distribution function,
dt2d
computes bivariate Student-t density function,
rt2d
generates bivariate Student-t random deviates,
delliptical2d
computes bivariate density for elliptical distributions. }grid2d(x = (0:10)/10, y = x)
density2d(x, y = NULL, n = 20, h = NULL, limits = c(range(x), range(y)))
hist2d(x, y = NULL, n = c(20, 20))
integrate2d(fun, error = 1.0e-5, ...)pnorm2d(x, y = x, rho = 0)
dnorm2d(x, y = x, rho = 0)
rnorm2d(n, rho = 0)
pcauchy2d(x, y = x, rho = 0)
dcauchy2d(x, y = x, rho = 0)
rcauchy2d(n, rho = 0)
pt2d(x, y = x, rho = 0, nu = 4)
dt2d(x, y = x, rho = 0, nu = 4)
rt2d(n, rho = 0, nu = 4)
delliptical2d(x, y = x, rho = 0, param = NULL, type = c("norm", "cauchy", "t",
"logistic", "laplace", "kotz", "epower"), output = c("vector", "list"))
x
and y
directions.
Defaults to normal reference bandwidth.n
may be a scalar or a two element vector.
The default value is 20.
[rnorm2d] -
the numu
and v
. If specified as "list"
then u
and
"norm"
, "cauchy"
, "t"
, "laplace"
,
"kotz"
, or "epower"
.y
is NULL then
x
is assumed to be a two column matrix, where the first
grid2d
returns a list with two vectors named $x
and $y
spanning
the grid defined by the coordinate vectors x
and y
.
density2d
hist2d
returns a list with three elements $x
, $y
, and
$z
. x
and y
are vectors spanning the two
dimensional grid and z
the corresponding matrix. The
output can directly serve as input to the plotting functions
image
, contour
and persp
.
integrate2d
returns a list with the $value
of the integral over the
unit square [0,1]^2, an $error
estimate and the number
of grid $points
used by the integration function.
pnorm2d
returns a vector of probabilities for the normal distribution
function.
pnorm2d
returns a two column matrix of random deviates generated from
the bivariate normal distribution function.## Normal Density:
x = (-40:40)/10
X = grid2d(x)
z = dnorm2d(X$x, X$y, rho = 0.5)
Z = list(x = x, y = x, z = matrix(z, ncol = length(x)))
persp(Z, theta = -40, phi = 30, col = "steelblue")
Run the code above in your browser using DataLab