I apologize for the delayed response. I was traveling.
As you noted, at present, geomorph and RRPP do not have 'general' Z-score comparison functions. Thus far we have provided functions to compare the strength of signal in specific attributes (e.g., compare the degree of integration or compare the degree of phylogenetic
signal, etc). But conceptually, our approach is not restricted to the functions we have generated. In fact, the method is far broader, and our RRPP-derived effect sizes could be obtained from other models, and compared across those models. Your question about
bilateral symmetry falls under this category.
To make such comparisons, one needs to dive under the hood a bit, and write some code that replicates the various components and extracts the bits of interest for the two sample test. Specifically, our effect size comparisons are based on a two-sample test,
which is:
Z12 = abs(theta1 - mu1) - (theta2 - mu2) / sqrt(sd1^2 + sd2^2)
Here, theta1 and theta2 are the observed values of the test statistic, mu1 and mu2 are the mean of the empirical sampling distributions, and sd1 and sd2 are the standard deviations of those sampling distributions. Importantly, all values above are found from
the transformed sampling distributions to ensure the distributions approximate a normal distribution.
Thus, we must obtain the empirical sampling distributions from the model of interest, transform them to approximate normality, and from this extract theta, mu, and sd. Below is code (not optimized, but readable) that will do this for a single bilat.symmetry
analysis, and a single component of the model (in this case, the FA component). This approach could be followed for the analysis of each of your locations, which can then be compared in pairwise fashion.
###
library(geomorph)
data(mosquito)
gdf <- geomorph.data.frame(wingshape = mosquito$wingshape,
ind = mosquito$ind,
side = mosquito$side,
replicate = mosquito$replicate)
Y.gpa <- gpagen(mosquito$wingshape)
mosquito.sym2 <- bilat.symmetry(A = Y.gpa, ind = ind, side = side, replicate = replicate, object.sym = FALSE, RRPP = TRUE,
data = gdf)
#bilat.symmetry analysis using base-geomorph functions
PSh <- procD.lm(Y.gpa$coords ~ ind + side + ind/side, data = gdf, verbose = T)
#COMPARE: results are the same
mosquito.sym$shape.anova
anova(PSh, error = c("ind:side", "ind:side", "Residuals"))
######
#extract components for Z-score comparison
F.ind <- PSh$ANOVA$MS[1,] / PSh$ANOVA$MS[3,]
F.side <- PSh$ANOVA$MS[2,] / PSh$ANOVA$MS[3,]
F.indside <- PSh$ANOVA$MS[3,] / PSh$ANOVA$RSS[3,]
# Effect sizes: the same
Z.ind <- effect.size(F.ind) #ind
Z.side <- effect.size(F.side) #side
Z.indside <- effect.size(F.indside) #ind:side
#Transformed empirical sampling distributions
F.ind.st <- geomorph:::box.cox(F.ind)$transformed
F.side.st <- geomorph:::box.cox(F.side)$transformed
# Theta, Mu, and Sd
Dean
--
Dr. Dean C. Adams
Distinguished Professor
Director, Ecology and Evolutionary Biology Graduate Program
Department of Ecology, Evolution, and Organismal Biology
Iowa State University