# NOT RUN {
## simulate a random sample from a multivariate Cauchy distribution
## note: example in high-dimension are obtained increasing p
set.seed(1)
n <- 100 # sample size
p <- 10 # dimension
dat <- matrix(rt(n*p, df = 1), nrow = n, ncol = p)
colnames(dat) <- paste0("Var", 1:p)
## perform 10-fold cross-validation repeated R=10 times
## note: for multi-core machines experiment with 'ncores'
set.seed(2)
a <- rsc_cv(x = dat, R = 10, K = 10, ncores = 1)
a
## plot the cross-validation estimates
plot(a)
## pass additional parameters to graphics::plot
plot(a , cex = 2)
# }
Run the code above in your browser using DataLab