As with other analytical methods covered in these
tutorials, similarity due to phylogeny will often need to be accounted
for in analyses of modularity. The function
phylo.modularity quantifies the degree of phylogenetic
modularity in two or more hypothesized modules of Procrustes shape
variables as defined by landmark coordinates, under a Brownian motion
model of evolution. The degree of modularity is characterized by the
covariance ratio covariance ratio (CR: see Adams 2016). This function is
an extension of the modularity.test function in the same
way that phylo.integration is an extension of integration.test. As with these other functions, input for
this function can be either multiple objects containing Procrustes
coordinates, or a single object along with a vector used to define
partitions.
For this analysis, the phylogenetic relationships among taxa are
described by the phylogeny, which in R is an object of class “phylo”.
Note that there is a slight difference between geomorph and
RRPP in how phylogenetic information is provided by the
user. In geomorph, phylogenetic information is generally provided as a
phylogeny of class “phylo”. This object is then converted to a
phylogenetic covariance matrix by the internal analytics of the
function. By contrast, in RRPP the user must first calculate the
phylogenetic covariance matrix, and then provide this to the analytical
functions to incorporate phylogenetic information. Users should be aware
of this slight difference, as several geomorph functions
call underlying RRPP functions (e.g.,
procD.pgls in geomorph calls lm.rrpp in
RRPP).
phylo.modularity()
For this example, we first create a vector (lmkpart) that defines the
partitions of our data. Then we run the analyses, including our
phylogeny as an argument of the function. The phylogenetic tree and
landmarks included in this example are from the “plethspecies” dataset,
available by default with geomorph.
lmkpart <- c("A","A","A","A","A","B","B","B","B","B","B")
MT <- phylo.modularity(lmks$coords, phy = phylo, partition.gp=lmkpart, CI = F, iter=999, print.progress = F)
Just like with the function modularity.test, results can
be summarized using the base R function summary. Likewise,
the base R function plot can be used to generate a
histogram of coefficients obtained via resampling is presented, with the
observed value designated by an arrow in the plot.
summary(MT)
##
## Call:
## phylo.modularity(A = lmks$coords, partition.gp = lmkpart, phy = phylo,
## CI = F, iter = 999, print.progress = F)
##
##
##
## CR: 1.1625
##
## P-value: 0.683
##
## Effect Size: 0.3738
##
## Based on 1000 random permutations
plot(MT)

This function returns an object of class “CR”, which is a list containing the following:
phylo.modularity output