## load example data set
data(X.artificial, envir = environment())
## create sequence of weight transformation limits
lw <- seq(0, 0.2, 0.02)
## perform the test and show q.min
L <- test.L(X = X.artificial, lw = lw, c = 100, plot = TRUE)
L$q.min
## a visualisation with more plot parameters
L <- test.L(X = X.artificial, lw = lw, c = 100, plot = TRUE,
ylim = c(0.5, 1), xlim = c(1, 7),
legend = "bottomright", cex = 0.7)
## another visualisation, a close-up
plot(1:7, L$L[1,1:7], type = "l",
xlab = "q", ylab = "Explained variance")
for(i in 2:7) {lines(1:7, L$L[i,1:7], col = i)}Run the code above in your browser using DataLab