data.grid: Draws the scatter plot of bivariate data in the unit square

View source: R/data_grid.R

data.gridR Documentation

Draws the scatter plot of bivariate data in the unit square

Description

Draws the scatter plot of bivariate data in the unit square

Usage

data.grid(U, draw.lines = TRUE, k = 4, m = 4)

Arguments

U

matrix of size kx2 with the values of both variables.

draw.lines

draws lines inside the unit square or not.

k

positive integer indicating the number of subintervals for the U_2 variable.

m

positive integer indicating the number of subintervals for the U_1 variable.

Value

Returns a scatter plot of bivariate data in the unit square.

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
data.grid(U=df, draw.lines = FALSE, k = k, m = m)
data.grid(U=df, draw.lines = TRUE, k = k, m = m)

GRIDCOPULA documentation built on June 22, 2024, 12:24 p.m.