contour-methods {copula} | R Documentation |
Methods for Contour Plots in Package 'copula'
Description
Methods for function contour
to draw contour lines aka a
level plot for objects from package copula.
Usage
## S4 method for signature 'Copula'
contour(x, FUN,
n.grid = 26, delta = 0,
xlab = quote(u[1]), ylab = quote(u[2]),
box01 = TRUE, ...)
## S4 method for signature 'mvdc'
contour(x, FUN, xlim, ylim, n.grid = 26,
xlab = quote(x[1]), ylab = quote(x[2]),
box01 = FALSE, ...)
Arguments
x |
|
FUN |
|
n.grid |
the number of grid points used in each dimension. This
can be a vector of length two, giving the number of grid points used
in x- and y-direction, respectively; the function |
delta |
a small number in |
xlab , ylab |
the x-axis and y-axis labels. |
xlim , ylim |
the |
box01 |
a logical specifying if a faint rectangle should be drawn
on the boundary of |
... |
further arguments for (the default method of)
|
Methods
Contour lines are drawn for "Copula"
or
"mvdc"
objects, see x
in the
Arguments section.
See Also
The persp-methods
for “perspective” aka
“3D” plots.
Examples
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))