Monte-Carlo Test on the percentage of explained (i.e. constrained) inertia
randtest.pcaiv.Rd
Performs a Monte-Carlo test on on the percentage of explained (i.e. constrained) inertia. The statistic is the ratio of the inertia (sum of eigenvalues) of the constrained analysis divided by the inertia of the unconstrained analysis.
Author
Stéphane Dray stephane.dray@univ-lyon1.fr, original code by Raphaël Pélissier
Examples
data(rpjdl)
millog <- log(rpjdl$mil + 1)
coa1 <- dudi.coa(rpjdl$fau, scann = FALSE)
caiv1 <- pcaiv(coa1, millog, scan = FALSE)
randtest(caiv1)
#> Monte-Carlo test
#> Call: randtest.pcaiv(xtest = caiv1)
#>
#> Observation: 0.2520234
#>
#> Based on 99 replicates
#> Simulated p-value: 0.01
#> Alternative hypothesis: greater
#>
#> Std.Obs Expectation Variance
#> 4.269297e+01 4.411699e-02 2.371501e-05