## Example 1
n <- 100
x <- runif(n, 0, 1)
y <- runif(n, 0, 1)
sample <- data.frame(x, y)
#qad
fit <- qad(sample)
plot(fit, addSample = TRUE, copula = FALSE)
## Example 2
n <- 100
x <- runif(n, -1, 1)
y <- x^2 + rnorm(n, 0, 0.1)
sample <- data.frame(x, y)
#qad
fit <- qad(sample)
plot(fit, addSample = TRUE, copula = TRUE)
plot(fit, addSample = TRUE, copula = FALSE)
Run the code above in your browser using DataLab