TestModularity function

Test modularity hypothesis

Test modularity hypothesis

Tests modularity hypothesis using cor.matrix matrix and trait groupings

TestModularity( cor.matrix, modularity.hypot, permutations = 1000, MHI = FALSE, ..., landmark.dim = NULL, withinLandmark = FALSE )

Arguments

  • cor.matrix: Correlation matrix
  • modularity.hypot: Matrix of hypothesis. Each line represents a trait and each column a module. if modularity.hypot[i,j] == 1, trait i is in module j.
  • permutations: Number of permutations, to be passed to MantelModTest
  • MHI: Indicates if test should use Modularity Hypothesis Index instead of AVG Ratio
  • ...: additional arguments passed to MantelModTest
  • landmark.dim: Used if permutations should be performed maintaining landmark structure in geometric morphometric data. Either 2 for 2d data or 3 for 3d data. Default is NULL for non geometric morphometric data.
  • withinLandmark: Logical. If TRUE within-landmark correlations are used in the calculation of matrix correlation. Only used if landmark.dim is passed, default is FALSE.

Returns

Returns mantel correlation and associated probability for each modularity hypothesis, along with AVG+, AVG-, AVG Ratio for each module. A total hypothesis combining all hypothesis is also tested.

Examples

cor.matrix <- RandomMatrix(10) rand.hypots <- matrix(sample(c(1, 0), 30, replace=TRUE), 10, 3) mod.test <- TestModularity(cor.matrix, rand.hypots) cov.matrix <- RandomMatrix(10, 1, 1, 10) cov.mod.test <- TestModularity(cov.matrix, rand.hypots, MHI = TRUE) nosize.cov.mod.test <- TestModularity(RemoveSize(cov.matrix), rand.hypots, MHI = TRUE)

References

Porto, Arthur, Felipe B. Oliveira, Leila T. Shirai, Valderes Conto, and Gabriel Marroig. 2009. "The Evolution of Modularity in the Mammalian Skull I: Morphological Integration Patterns and Magnitudes." Evolutionary Biology 36 (1): 118-35. doi:10.1007/s11692-008-9038-3.

See Also

MantelModTest

Author(s)

Diogo Melo, Guilherme Garcia

  • Maintainer: Diogo Melo
  • License: MIT + file LICENSE
  • Last published: 2023-12-05

Useful links