Learn R Programming

qad (version 0.2.0)

plot_density: Plot density of empirical checkerboard copula

Description

Plots the density/mass of the empirical checkerboard copula.

Usage

plot_density(
  mass_matrix,
  density = TRUE,
  color = "plasma",
  rb_values = c(10, 0.315, 0.15)
)

Arguments

mass_matrix

a squared matrix containing the mass distribution, e.g. output of the function emp_c_copula().

density

a logical (TRUE = default) whether the density or the mass is plotted.

color

Select the color palette. Options are c("plasma" (default), "viridis", "inferno", "magma", "cividis").

rb_values

a vector of size 3 with number of values, start value and end value in the rainbow colors space.

Value

a density plot (or mass distribution)

Examples

Run this code
# NOT RUN {
n <- 1000
x <- runif(n,0,1)
y <- runif(n,0,1)
sample <- data.frame(x,y)
plot(sample)

mass <- emp_c_copula(sample, resolution=8)
plot_density(mass, density=TRUE)
plot_density(mass, density=FALSE)
# }

Run the code above in your browser using DataLab