minpermute: Number of Permutations for MCA

View source: R/minpermute.R

minpermuteR Documentation

Number of Permutations for MCA

Description

Calculates the number of permutations suitable for testing Multiscale Codependence Analysis.

Usage

minpermute(alpha, nbtest, margin = 1, ru = 3)

Arguments

alpha

The familywise type I error threshold allowable for the complete analysis.

nbtest

The number of test performed (the number of eigenvectors in the 'mem' object in the case of MCA).

margin

A margin allowed for the number of permutation. Default value: 1.

ru

The magnitude of the round-up to apply to the number of permutations.

Details

This function calculate the number of permutations for use with permute.cdp. Argument margin allows to apply a safe margin to the number of permutations. The minimal suitable value for this parameter is 1. Argument ru allows one to round-up the number of permutations. A value of 0 implies no round-up, a value of 1 a round-up to the next ten, 2 a round-up to the next hundred, and so on. Function minpermute is called internally by permute.cdp in case permute = NA. In that case, the margin is set to 10 (margin = 10) and the outcome is rounded-up to the next thousand (ru = 3). This function is meant for users that wish to apply their own margins and round-up factors to calculate the number of permutations for use with permute.cdp.

Value

The minimum number of permutation to be used for permute.cdp.

Author(s)

Guillaume Guénard [aut, cre] (<https://orcid.org/0000-0003-0761-3072>), Pierre Legendre [ctb] (<https://orcid.org/0000-0002-3838-3305>), Bertrand Pages [ctb] Maintainer: Guillaume Guénard <guillaume.guenard@umontreal.ca>

References

Guénard, G., Legendre, P., Boisclair, D., and Bilodeau, M. 2010. Multiscale codependence analysis: an integrated approach to analyse relationships across scales. Ecology 91: 2952-2964

See Also

permute.cdp

Examples

## For a 5\% threshold under 50 tests.
minpermute(alpha = 0.05, nbtest=50)

## Allowing more margin (implies more computation time).
minpermute(alpha = 0.05, nbtest=50, margin=10, ru=3)


codep documentation built on Sept. 24, 2024, 1:07 a.m.