geomorphR / geomorph

Geomorph is a software package for performing all stages of geometric morphometric shape analysis of landmark points and curves in 2-and-3-dimensions as well as 3D surfaces in the R statistical computing environment. This repository is dedicated to providing stable and beta versions between CRAN uploads
76 stars 20 forks source link

combine.subsets #20

Closed bailliecharles closed 6 years ago

bailliecharles commented 6 years ago

Hi, This is perhaps a method rather code question? I’ve measured the shape of two appendages per individual for n individuals. I have analysed these separately using Procrustes ANOVA and each appendage is siginificant for the factor I am assessing (with large effect sizes). I’ve gone back and it seems there is very strong support (from two block partial least squares) for integration between the two appendages - which is probably the biological expectation. So, I combine them together using combine.subsets and reanalyse my data - nothing significant at all for my grouping factor. I’ve tried combining without relative size rescaling and the same result. I’d have thought that such string effects would be carried over rather than nullified in the combined set. So should I analyse each separately despite, evidence of integration, or combined but expect to not detect any (significant) effect of my factor? Thanks, Charles

mlcollyer commented 6 years ago

Charles,

I agree it is odd, but it might be possible with antagonistic trends. In situations like this, I like to consider a simple example with univariate data, to see if it makes sense. Let’s do that with appendage length and sexual dimorphism.

n <- 40 sex <- rep(c(0,1), each = n/2)

len1 <- 5 + 2 sex + rnorm(n) # males have longer appendages len2 <- 10 -2 sex + rnorm(n) # females have longer appendages

size <- len1 + len2 # total size

two.b.pls(len1, len2) |=============================================================================================| 100%

Call: two.b.pls(A1 = len1, A2 = len2)

r-PLS: -0.463

P-value: 0.004

Based on 1000 random permutations

Note that a 2B PLS (integration test) suggests that the variables are integrated (correlated). Now let’s see what happens with ANOVAs

procD.lm(len1 ~ sex)

Warning: no geomorph data frame provided. If an error occurs, this might be the reason.

Sums of Squares calculations: 1000 permutations. |=============================================================================================| 100%

Call: procD.lm(f1 = len1 ~ sex)

Type I (Sequential) Sums of Squares and Cross-products Randomized Residual Permutation Procedure Used 1000 Permutations ANOVA effect sizes and P-values based on empirical F distributions

      Df     SS     MS   Rsq      F      Z Pr(>F)   

sex 1 43.311 43.311 0.537 44.073 2.1917 0.001 ** Residuals 38 37.343 0.983 0.463
Total 39 80.653

Signif. codes: 0 ‘’ 0.001 ‘’ 0.01 ‘’ 0.05 ‘.’ 0.1 ‘ ’ 1

procD.lm(len2 ~ sex)

Warning: no geomorph data frame provided. If an error occurs, this might be the reason.

Sums of Squares calculations: 1000 permutations. |=============================================================================================| 100%

Call: procD.lm(f1 = len2 ~ sex)

Type I (Sequential) Sums of Squares and Cross-products Randomized Residual Permutation Procedure Used 1000 Permutations ANOVA effect sizes and P-values based on empirical F distributions

      Df     SS     MS     Rsq      F      Z Pr(>F)   

sex 1 32.930 32.930 0.35386 20.811 1.9375 0.001 ** Residuals 38 60.129 1.582 0.64614
Total 39 93.058

Signif. codes: 0 ‘’ 0.001 ‘’ 0.01 ‘’ 0.05 ‘.’ 0.1 ‘ ’ 1

procD.lm(size ~ sex)

Warning: no geomorph data frame provided. If an error occurs, this might be the reason.

Sums of Squares calculations: 1000 permutations. |=============================================================================================| 100%

Call: procD.lm(f1 = size ~ sex)

Type I (Sequential) Sums of Squares and Cross-products Randomized Residual Permutation Procedure Used 1000 Permutations ANOVA effect sizes and P-values based on empirical F distributions

      Df     SS      MS     Rsq      F         Z Pr(>F)

sex 1 0.710 0.71004 0.00759 0.2906 -0.030668 0.591 Residuals 38 92.856 2.44358 0.99241
Total 39 93.566

Effect sizes notwithstanding, this is the pattern you saw. The two morphological features are antagonistic. Combining them to form one feature removes the different signals we might observe in the two. The “fact” that they were integrated is actually what is odd in this case. (Note, I did the same thing with the larvalMorph data, and although the combined head and tail shapes still had a significant treatment effect, the effect size decreased compared to one of the original shapes.)

My personal opinion is that I think concluding integration based on a P-value is fraught with potential poor conclusions. Maybe looking at the deformation grids in a PLS plot will help elucidate why combining shapes changed the outcome. Maybe there is antagonism. Maybe one appendage becomes longer and thinner with a gradient and the other becomes squat. Once combined, these signals are lost.

Good luck! Mike

On Aug 28, 2018, at 3:29 AM, bailliecharles notifications@github.com wrote:

Hi, This is perhaps a method rather code question? I’ve measured the shape of two appendages per individual for n individuals. I have analysed these separately using Procrustes ANOVA and each appendage is siginificant for the factor I am assessing (with large effect sizes). I’ve gone back and it seems there is very strong support (from two block partial least squares) for integration between the two appendages - which is probably the biological expectation. So, I combine them together using combine.subsets and reanalyse my data - nothing significant at all for my grouping factor. I’ve tried combining without relative size rescaling and the same result. I’d have thought that such string effects would be carried over rather than nullified in the combined set. So should I analyse each separately despite, evidence of integration, or combined but expect to not detect any (significant) effect of my factor? Thanks, Charles

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/geomorphR/geomorph/issues/20, or mute the thread https://github.com/notifications/unsubscribe-auth/AGjaconunXHI4F2HKH5UeIsqtAAuDQoZks5uVPFVgaJpZM4WPD-s.

bailliecharles commented 6 years ago

Mike, Thanks for your detailed and speedy reply. Your hunch was absolutely correct, and visualising the grids a good idea (though I’d like to understand the underlying math in the combination). The appendages change shape antagonisitacally across my factor which must have a cancelling effect. There are other differences too which was already making me think the appendages function slightly differently so that fits. Thanks again!