plot.SimCop | R Documentation |
Plot a bivariate copula or its density function. Essentially hands over immediately to persp3d
.
## S3 method for class 'SimCop'
plot(x, ...)
## S3 method for class 'SimCop'
persp3d(
x,
...,
type = c("cdf", "pdf"),
nx = 129,
ny = 129,
col = heat.colors(100),
qcut = 0.95,
cut,
xlab = expression(u[1]),
ylab = expression(u[2])
)
x |
an object of |
... |
additional arguments passed to |
type |
specifies whether the copula (“ |
nx , ny |
length of grids that define the gridlines on which the plotted function is evaluated. |
col |
colour scheme to use for the surface; see ‘Details’. |
qcut , cut |
used if |
xlab , ylab |
default labels for the two axes. |
If type
is “pdf
”, then x
must have a function with name “pdfCopula
” in its environment which evaluates the probability density function of the copula stored in x
.
For plotting the copula, the “x”-grid and “y”-grid are produced by using, respectively, nx
and ny
equispaced points between 0 and 1 (inclusive). To avoid evaluating the density function at the boundary, if type
is “pdf
”, then grids are initially generated in the same manner, after which the first grid point is removed and all remaining grid points are shifted towards the origin by half the distance between two neighbouring grid points.
The function to be plotted is evaluated at all possible combination of the grid points. As the function values of the density function can be large, in particular for extreme value copulae, the values are truncated using either cut
(absolute value) or qcut
(corresponding quantile of all values as determined by the quantile
function).
Finally, the colour scheme passed by argument col
is used to assign a colour to every point at which the function was evaluated by linearly mapping the function values onto the provided colours.
Returns a list with four components invisibly. Components x
and y
contain the location of grid lines at which the function was evaluate. Component z
contains the function evaluations (possibly truncated) and component col
contains the col used.
Berwin A Turlach berwin.turlach@gmail.com
Cop1 <- NewMVFrankCopula(2)
plot(Cop1)
plot(Cop1, type = "p", qcut = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.