# Permutation Test for Principal Component Analysis

The procedure of permutation test for PCA is as follows:

For each replicate,

1. Individually permute each column of the data matrix.

2. Conduct the PCA and find the proportion of variance explained by each of the components 1 to s. Store this information.

3. Repeat 1 and 2 R times.

At the end of this we will have a matrix with R rows and s columns that contains the proportion of variance explained by each component for each replicate.

Finally, compare the observed values from the original data to the set of values from the permutations in order to determine the approximate p-value.

The R code:

The result:

$pve Comp.1 Comp.2 Comp.3 Comp.4 Comp.5 Comp.6 Comp.7 Comp.8 0.23129378 0.14864525 0.11552865 0.06741744 0.06274641 0.05858431 0.05033795 0.04484122 Comp.9 Comp.10 0.03873311 0.03431297$pval
[1] 0.000 0.000 0.000 1.000 1.000 0.996 1.000 1.000 1.000 1.000