| test.factors | R Documentation | 
This function performs eigenspace decomposition using the weight-transformed
matrix W to determine the explained variance with increasing number of 
factors. Depending on the number of provided weight transformation limits 
(l) a vector or a matrix is returned.
test.factors(X, l, c, r.min = 0.95, plot = FALSE, legend, ...)
| X | 
 | 
| l | 
 | 
| c | 
 | 
| r.min | 
 | 
| plot | 
 | 
| legend | 
 | 
| ... | Additional arguments passed to the plot function. Use
 | 
The results may be used to define a minimum number of end-members for subsequent modelling steps, e.g. by using the Kaiser criterion, which demands a minimum number of eigenvalues to reach a squared R of 0.95.
List with objects 
| L | Vector or matrix of cumulative explained variance. | 
| q.min | Vector with number of factors that passed r.min. | 
Michael Dietze, Elisabeth Dietze
Dietze E, Hartmann K, Diekmann B, IJmker J, Lehmkuhl F, Opitz S, Stauch G, Wuennemann B, Borchers A. 2012. An end-member algorithm for deciphering modern detrital processes from lake sediments of Lake Donggi Cona, NE Tibetan Plateau, China. Sedimentary Geology 243-244: 169-180.
## load example data set
data(example_X)
## create sequence of weight transformation limits
l <- seq(from = 0, to = 0.2, 0.02)
## perform the test and show q.min
L <- test.factors(X = X, l = l, c = 100, plot = TRUE)
L$q.min
## a visualisation with more plot parameters
L <- test.factors(X = X, l = l, 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)}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.