Learn R Programming

evolqg (version 0.1-7)

TestModularity: Test modularity hypothesis

Description

Tests modularity hypothesis using cor.matrix matrix and trait groupings

Usage

TestModularity(cor.matrix, modularity.hipot, permutations = 100,
  ICV = FALSE)

CreateHipotMatrix(modularity.hipot)

Arguments

cor.matrix
Correlation matrix
modularity.hipot
Matrix of hypothesis. Each line represents a trait and each column a module. if modularity.hipot[i,j] == 1, trait i is in module j.
permutations
Number of permutations, to be passed to MantelCor
ICV
Indicates if test should use AVG Index instead of AVG Ratio

Value

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

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

MantelCor

Examples

Run this code
cor.matrix <- RandomMatrix(10)
rand.hipots <- matrix(sample(c(1, 0), 30, replace=TRUE), 10, 3)
mod.test <- TestModularity(cor.matrix, rand.hipots)

cov.matrix <- RandomMatrix(10, 1, 1, 10)
cov.mod.test <- TestModularity(cov.matrix, rand.hipots, ICV = TRUE)
nosize.cov.mod.test <- TestModularity(RemoveSize(cov.matrix), rand.hipots, ICV = TRUE)

Run the code above in your browser using DataLab