Learn R Programming

GRIDCOPULA (version 1.0.1)

data.grid: 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)

Value

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

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.

Examples

Run this code
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)

Run the code above in your browser using DataLab