testdim: Function to perform a test of dimensionality

Description Usage Arguments Value Author(s) References See Also Examples

Description

This functions allow to test for the number of axes in multivariate analysis. The procedure testdim.pca implements a method for principal component analysis on correlation matrix. The procedure is based on the computation of the RV coefficient.

Usage

1
2
3
testdim(object, ...)
## S3 method for class 'pca'
testdim(object, nrepet = 99, nbax = object$rank, alpha = 0.05, ...)

Arguments

object

an object corresponding to an analysis (e.g. duality diagram, an object of class dudi)

nrepet

the number of repetitions for the permutation procedure

nbax

the number of axes to be tested, by default all axes

alpha

the significance level

...

other arguments

Value

An object of the class krandtest. It contains also:

nb

The estimated number of axes to keep

nb.cor

The number of axes to keep estimated using a sequential Bonferroni procedure

Author(s)

Stephane Dray stephane.dray@univ-lyon1.fr

References

Dray, S. (2007) On the number of principal components: A test of dimensionality based on measurements of similarity between matrices. Computational Statistics and Data Analysis, in press.

See Also

dudi.pca, RV.rtest,testdim.multiblock

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
tab <- data.frame(matrix(rnorm(200),20,10))
pca1 <- dudi.pca(tab,scannf=FALSE)
test1 <- testdim(pca1)
test1
test1$nb
test1$nb.cor
data(doubs)
pca2 <- dudi.pca(doubs$env,scannf=FALSE)
test2 <- testdim(pca2)
test2
test2$nb
test2$nb.cor

Example output

class: krandtest lightkrandtest 
Monte-Carlo tests
Call: testdim.pca(object = pca1)

Number of tests:   10 

Adjustment method for multiple comparisons:   none 
Permutation number:   99 
      Test       Obs    Std.Obs   Alter Pvalue
1   Axis 1 0.6517098  0.9757790 greater   0.20
2   Axis 2 0.6538891  0.7112931 greater   0.24
3   Axis 3 0.6839662  0.8102534 greater   0.22
4   Axis 4 0.6170342 -0.8950455 greater   0.80
5   Axis 5 0.6683859  0.8973686 greater   0.16
6   Axis 6 0.7687320  2.5089913 greater   0.02
7   Axis 7 0.6227411 -0.3868539 greater   0.63
8   Axis 8 0.6365599  0.1336160 greater   0.44
9   Axis 9 0.7778513  1.9523465 greater   0.04
10 Axis 10 1.0000000  5.2971957 greater   0.01

[1] 0
[1] 0
class: krandtest lightkrandtest 
Monte-Carlo tests
Call: testdim.pca(object = pca2)

Number of tests:   11 

Adjustment method for multiple comparisons:   none 
Permutation number:   99 
      Test       Obs    Std.Obs   Alter Pvalue
1   Axis 1 0.9276029 10.2622174 greater   0.01
2   Axis 2 0.8765561  5.4896145 greater   0.01
3   Axis 3 0.8195407 -0.9536363 greater   0.88
4   Axis 4 0.7130800  0.7479615 greater   0.23
5   Axis 5 0.7621707  1.9229507 greater   0.05
6   Axis 6 0.7781209  2.1174858 greater   0.05
7   Axis 7 0.8316557  4.7042069 greater   0.01
8   Axis 8 0.9641126  5.4685423 greater   0.01
9   Axis 9 0.7978495  1.0466351 greater   0.17
10 Axis 10 0.9701563  6.6916268 greater   0.01
11 Axis 11 1.0000000  9.2356324 greater   0.01

[1] 2
[1] 2

ade4 documentation built on May 2, 2019, 5:50 p.m.

Related to testdim in ade4...