Plot a bivariate copula or its density function. Essentially hands over immediately to persp3d
.
# S3 method for SimCop
plot(x, ...)# S3 method for 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])
)
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.
an object of class
‘SimCop’.
additional arguments passed to persp3d
.
specifies whether the copula (“cdf
”) or its probability density function (“pdf
”) is plotted; see ‘Details’. Can be abbreviated.
length of grids that define the gridlines on which the plotted function is evaluated.
colour scheme to use for the surface; see ‘Details’.
used if type
is “pdf
”; see ‘Details’.
default labels for the two axes.
Berwin A Turlach berwin.turlach@gmail.com
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.
Cop1 <- NewMVFrankCopula(2)
plot(Cop1)
plot(Cop1, type = "p", qcut = 1)
Run the code above in your browser using DataLab