Monte-Carlo Test on the sum of eigenvalues of a co-inertia analysis (in C++ with Rcpp).
RV.randtest.Rd
performs a Monte-Carlo Test on the sum of eigenvalues of a co-inertia analysis.
References
Heo, M. & Gabriel, K.R. (1997) A permutation test of association between configurations by means of the RV coefficient. Communications in Statistics - Simulation and Computation, 27, 843-856.
Examples
data(doubs)
pca1 <- dudi.pca(doubs$env, scal = TRUE, scann = FALSE)
pca2 <- dudi.pca(doubs$fish, scal = FALSE, scann = FALSE)
rv1 <- RV.randtest(pca1$tab, pca2$tab, 99)
rv1
#> Monte-Carlo test
#> Call: RV.randtest(df1 = pca1$tab, df2 = pca2$tab, nrepet = 99)
#>
#> Observation: 0.4505569
#>
#> Based on 99 replicates
#> Simulated p-value: 0.01
#> Alternative hypothesis: greater
#>
#> Std.Obs Expectation Variance
#> 8.332566040 0.087028506 0.001903352
plot(rv1)