contour-methods {copula} | R Documentation |
Methods for function contour
to draw contour lines aka a
level plot for objects from package copula.
## S4 method for signature 'copula' contour(x, fun, n = 51, delta = 0, box01 = TRUE, ...) ## S4 method for signature '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 = FALSE, ...)
x |
|
fun |
n |
(for |
delta |
a very small number in [0, 1/2),
defaulting to zero. The x- and y-ranges to be used for plotting
will be |
xlim, ylim |
( |
nx,ny |
( |
xis, yis |
( |
box01 |
logical specifying if faint rectangle should be drawn
at the [0,1]^2 borders (often useful for copulas, but
typically not for general multivariate distributions
( |
... |
further arguments for (the default method of)
|
Contour lines are drawn for "copula"
or
"mvdc"
objects, see x
in the
Arguments section.
The persp-methods
for “perspective” aka
“3D” plots.
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))