Learn R Programming

kdecopula (version 0.4.1)

plot.kdecopula: Plotting kdecopula objects

Description

Produces perspective or contour plots for a kdecopula object.

Usage

## S3 method for class 'kdecopula':
plot(x, type = "surface", margins, size, ...)

## S3 method for class 'kdecopula':
contour(x, margins = "norm", size = 100L, ...)

Arguments

x
kdecopula object.
type
plot type; either "contour" or "surface" (partial matching is activated) for a contour or perspective/surface plot respectively.
margins
either "unif" for the original copula density or "norm" for the transformed density with standard normal margins (partial matching is activated). Default is "norm" for type = "contour", and "uni
size
integer; the plot is based on values on a $size x size$ grid; default is 100 for type = "contour", and 25 for type = "surface".
...
optional arguments passed to contour or wireframe.

See Also

kdecop, contour, wireframe

Examples

Run this code
## load data and transform with empirical cdf
data(wdbc)
udat <- apply(wdbc[, -1], 2, function(x) rank(x)/(length(x)+1))

## estimation of copula density of variables 5 and 6
obj <- kdecop(udat[, 5:6])

## plots
plot(obj)  # surface plot of copula density
contour(obj)  # contour plot with standard normal margins
contour(obj, margins = "unif")  # contour plot of copula density

Run the code above in your browser using DataLab