# NOT RUN {
# }
# NOT RUN {
# EXAMPLE 1
data <- mvrnorm(100, c(0, 5), diag(2) * 5)
# By default depth_params2 = depth_params1
depthLocal(data, data, depth_params1 = list(method = "LP"))
depthLocal(data, data, depth_params1 = list(method = "LP"),
depth_params2 = list(method = "Projection"))
# Depth contour
depthContour(data, depth_params = list(method = "Local", depth_params1 = list(method = "LP")))
# EXAMPLE 2
data(inf.mort, maesles.imm)
data1990 <- na.omit(cbind(inf.mort[, 1], maesles.imm[, 1]))
depthContour(data1990,
depth_params = list(
method = "Local",
depth_params1 = list(method = "LP"),
beta = 0.3
))
# EXAMPLE 3
Sigma1 <- matrix(c(10, 3, 3, 2), 2, 2)
X1 <- mvrnorm(n = 8500, mu = c(0, 0), Sigma1)
Sigma2 <- matrix(c(10, 0, 0, 2), 2, 2)
X2 <- mvrnorm(n = 1500, mu = c(-10, 6), Sigma2)
BALLOT <- rbind(X1, X2)
train <- sample(1:10000, 100)
data <- BALLOT[train, ]
depthContour(data,
depth_params = list(
method = "Local",
beta = 0.3,
depth_params1 = list(method = "Projection")
))
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab