rtest.between {ade4}R Documentation

Monte-Carlo Test on the between-groups inertia percentage (in R).

Description

Performs a Monte-Carlo test on the between-groups inertia percentage.

Usage

## S3 method for class 'between':
rtest(xtest, nrepet = 99, ...)

Arguments

xtest an object of class between
nrepet the number of permutations
... further arguments passed to or from other methods

Value

a list of the class rtest

Author(s)

Daniel Chessel

References

Romesburg, H. C. (1985) Exploring, confirming and randomization tests. Computers and Geosciences, 11, 19–37.

Examples

data(meaudret)
pca1 <- dudi.pca(meaudret$mil, scan = FALSE, nf = 3)
rand1 <- rtest(between(pca1, meaudret$plan$dat, scan = FALSE), 99)
rand1
plot(rand1, main = "Monte-Carlo test")

Worked out examples


> library(ade4)
> ### Name: rtest.between
> ### Title: Monte-Carlo Test on the between-groups inertia percentage (in
> ###   R).
> ### Aliases: rtest.between
> ### Keywords: multivariate nonparametric
> 
> ### ** Examples
> 
> data(meaudret)
> pca1 <- dudi.pca(meaudret$mil, scan = FALSE, nf = 3)
> rand1 <- rtest(between(pca1, meaudret$plan$dat, scan = FALSE), 99)
> rand1
Monte-Carlo test
Observation: 0.3722686 
Call: as.rtest(sim = sim, obs = obs)
Based on 99 replicates
Simulated p-value: 0.01 
> plot(rand1, main = "Monte-Carlo test")
> 
> 
> 
> 

[Package ade4 Index]