| randtest.pcaiv {ade4} | R Documentation |
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.
## S3 method for class 'pcaiv': randtest(xtest, nrepet = 99, ...) ## S3 method for class 'cca': randtest(xtest, nrepet = 99, ...) ## S3 method for class 'pcaivortho': randtest(xtest, nrepet = 99, ...)
xtest |
an object of class pcaiv, pcaivortho or cca |
nrepet |
the number of permutations |
... |
further arguments passed to or from other methods |
a list of the class randtest
Stephane Dray dray@biomserv.univ-lyon1.fr, original code by Raphael Pelissier
data(rpjdl) millog <- log(rpjdl$mil + 1) iv1 <- cca(rpjdl$fau, millog, scan = FALSE) randtest(iv1)
> library(ade4)
> ### Name: randtest.pcaiv
> ### Title: Monte-Carlo Test on the percentage of explained (i.e.
> ### constrained) inertia
> ### Aliases: randtest.pcaiv randtest.cca randtest.pcaivortho
> ### Keywords: multivariate nonparametric
>
> ### ** Examples
>
> data(rpjdl)
> millog <- log(rpjdl$mil + 1)
> iv1 <- cca(rpjdl$fau, millog, scan = FALSE)
> randtest(iv1)
Monte-Carlo test
Call: randtest.cca(xtest = iv1)
Observation: 0.2520234
Based on 99 replicates
Simulated p-value: 0.01
Alternative hypothesis: greater
Std.Obs Expectation Variance
4.439441e+01 4.495246e-02 2.175614e-05
>
>
>
>