contour
to draw contour lines aka a
level plot for objectsf from package ## S3 method for class 'copula':
contour(x, fun,
n = 51, delta = 0, box01 = TRUE, \dots)## S3 method for class 'mvdc':
contour(x, fun,
xlim, ylim, nx = 51, ny = 51,
xis = seq(xlim[1], xlim[2], length = nx),
yis = seq(ylim[1], ylim[2], length = ny),
box01 = TRUE, ...)
"copula "
or
a "mvdc "
object."copula"
:) the number of points in both
directions to do the plotting. The function fun
will be
evaluated on a grid of size $n \times n$.[0+delta, 1-delta]
, i.e., [0,1]
by default."mvdc"
:) the range
of the x or
y variable, respectively."mvdc"
:) the number of points in x- or
y-direction, respectively. The function fun
will be
evaluated on a grid of size $nx \times ny$."mvdc"
:) instead of specifying xlim,
ylim
and nx, ny
, the numeric vectors (of length nx
and ny
) may be specified directly.contour()
, e.g., nlevels
, levels
, etc."copula "
or
"mvdc "
objects, see x
in the
Arguments section.persp-methods
for contour(frankCopula(-0.8), dCopula)
contour(frankCopula(-0.8), dCopula, delta=1e-6)
contour(frankCopula(-1.2), pCopula)
contour(claytonCopula(2), pCopula)
## the Gumbel copula density is "extreme"
## --> use fine grid (and enough levels):
r <- contour(gumbelCopula(3), dCopula, n=200, nlevels=100)
range(r$z)# [0, 125.912]
## Now superimpose contours of three resolutions:
contour(r, levels=seq(1, max(r$z), by=2), lwd=1.5)
contour(r, levels = (1:13)/2, add=TRUE, col=adjustcolor(1,3/4), lty=2)
contour(r, levels = (1:13)/4, add=TRUE, col=adjustcolor(2,1/2),
lty=3, lwd=3/4)
x <- mvdc(gumbelCopula(3), c("norm", "norm"),
list(list(mean = 0, sd =1), list(mean = 1)))
contour(x, dMvdc, xlim=c(-2, 2), ylim=c(-1, 3))
contour(x, pMvdc, xlim=c(-2, 2), ylim=c(-1, 3))
Run the code above in your browser using DataLab