Hello everyone,
I have conducted a Procrustes ANOVA to compare populations (each population 34-41 specimens) from six geographic sites using landmark data from moth wings, employing geometric morphometrics with the geomorph package in R. This analysis allows me to examine shape differences across sites while accounting for allometry. I successfully ran the following code in geomorph and performed pairwise comparisons for size. However, my attempts to implement pairwise comparisons for shape have been unsuccessful. Despite trying various codes, I have been unable to resolve the issue. Could you please assist me in running the correct code?
Here is the working code I used for the Procrustes ANOVA and size pairwise comparison:
> Y <- readland.tps("D:/FW_F.tps", specID = "imageID")
>classifier <- read.csv("D:/classifier_FW_F.csv", header=T, row.names=1)
>Y.gpa <- gpagen(Y)
>gdf <- geomorph.data.frame(shape = Y.gpa$coords, size = Y.gpa$Csize, site = >factor(classifier$site))
>fit_allo <- procD.lm(shape ~ size * site, data = gdf, iter = 9999, RRPP = TRUE)
>summary(fit_allo)
>size_pairwise <- pairwise.t.test(gdf$size, gdf$site, p.adjust.method = "bonferroni")
>print(size_pairwise)
Unfortunately, the following code for shape pairwise comparison does not work:
>shape_pairwise <- pairwise(fit_allo, groups = gdf$site)
>print(shape_pairwise)
I would greatly appreciate any guidance or suggestions to fix this problem. Thank you!
Best regards,
Mehdi
--Dr. Dean C. AdamsDistinguished ProfessorDirector, Ecology and Evolutionary Biology Graduate ProgramDepartment of Ecology, Evolution, and Organismal BiologyIowa State Universityphone: 515-294-3834
Dear Dean,
Thank you very much for your kind reply. I apologize if I wasn’t able to resolve the issue using the help file. I believe I can solve the problem as follows:
> fit_allo <- procD.lm(shape ~ size * site, data = gdf, iter = 9999, RRPP = TRUE)
> PW <- pairwise(fit_allo, groups = gdf$site)
> summary(PW, test.type = "dist")
and for the pairwise comparison of centroid sizes:
> fit_allo_size <- procD.lm(size ~ site, data = gdf, iter = 9999, RRPP = TRUE)
> summary(fit_allo_size)
> size_comparisons <- pairwise(fit_allo_size, groups = gdf$site)
> summary(size_comparisons, test.type = "dist")
All the best,
Mehdi