contour_image_grid {GRIDCOPULA}R Documentation

Draws the density / distribution function of a grid copula with contours and colors

Description

Draws the density / distribution function of a grid copula with contours and colors

Usage

contour_image_grid(
  gc,
  FUN = "p.grid",
  u1 = seq(0, 1, length.out = 100),
  u2 = seq(0, 1, length.out = 100),
  color.name = "heat.colors",
  color.size = 40
)

Arguments

gc

a grid type copula object.

FUN

the name of the function to be applied (d.grid, p.grid), default is 'p.grid'.

u1

indicates the place for lines on axis u_1.

u2

indicates the place for lines on axis u_2.

color.name

indicates the palette of colors.

color.size

indicates the number of colors.

Value

Returns a graph of the density / distribution.

Examples

n <- 500
x <- rgamma(n,4,1/2)
e <- rnorm(n,0,.3)
y <- sin(x+e)
Fx <- ecdf(x)
Fy <- ecdf(y)
u <- Fx(x)
v <- Fy(y)
df <- cbind(u,v)
k <- 10
m <- 10
copula.grid <- estimate.gridCopula(U = df, k = k, m = m , method = "ls")
contour_image_grid(gc = copula.grid, FUN = 'd.grid', color.name= "rainbow", color.size = 10)
contour_image_grid(gc = copula.grid, FUN = 'p.grid', color.name = "rainbow", color.size = 10)

#Iris
copula.grid <- estimate.gridCopula(X = iris[,1:2], k = k, m = m , method = "ls")
contour_image_grid(gc = copula.grid, FUN = 'd.grid', color.name= "rainbow", color.size = 10)
contour_image_grid(gc = copula.grid, FUN = 'p.grid', color.name = "rainbow", color.size = 10)

[Package GRIDCOPULA version 1.0.1 Index]