--
You received this message because you are subscribed to the Google Groups "geomorph R package" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geomorph-r-pack...@googlegroups.com.
To post to this group, send email to geomorph-...@googlegroups.com.
Visit this group at https://groups.google.com/group/geomorph-r-package.
To view this discussion on the web, visit https://groups.google.com/d/msgid/geomorph-r-package/6777f54d-d404-4441-8ca2-02dfed5ac672%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Randomized Residual Permutation Procedure Used 10000 Permutations ANOVA Table Df SSE SS R2 F Z Pr(>F) ~1 371 0.21099 ~Lake 366 0.19333 0.017656 0.083683 6.685 6.0728 1e-04 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
## and P values
P-values Eck Glashan Lairage Lomond Shira Tarsan Eck 1e+00 1e-04 0.0001 0.0001 0.0001 0.0001 Glashan 1e-04 1e+00 0.0001 0.0001 0.0001 0.0001 Lairage 1e-04 1e-04 1.0000 0.0038 0.2611 0.0002 Lomond 1e-04 1e-04 0.0038 1.0000 0.0001 0.0152 Shira 1e-04 1e-04 0.2611 0.0001 1.0000 0.0001 Tarsan 1e-04 1e-04 0.0002 0.0152 0.0001 1.0000
### Using size as a covariate
lakes.pairwise2 <- advanced.procD.lm(Shape~log(size)+Lake,~log(size)*Lake,groups= ~Lake,slope=~log(size),iter=9999)
Randomized Residual Permutation Procedure Used 1000 Permutations ANOVA Table Df SSE SS R2 F Z Pr(>F) ~log(size) + Lake 365 0.19149 ~log(size) + Lake + log(size):Lake 360 0.18489 0.0066022 0.029151 2.5711 2.4903 0.001 **
P-values Eck Glashan Lairage Lomond Shira Tarsan Eck 1.000 0.090 0.506 0.615 0.213 0.804 Glashan 0.090 1.000 0.036 0.180 0.008 0.054 Lairage 0.506 0.036 1.000 0.317 0.760 0.683 Lomond 0.615 0.180 0.317 1.000 0.080 0.374 Shira 0.213 0.008 0.760 0.080 1.000 0.311 Tarsan 0.804 0.054 0.683 0.374 0.311 1.000
P-values Eck Glashan Lairage Lomond Shira Tarsan Eck 1.000 0.010 0.075 0.081 0.010 0.001 Glashan 0.010 1.000 0.269 0.239 0.138 0.327 Lairage 0.075 0.269 1.000 0.655 0.530 0.119 Lomond 0.081 0.239 0.655 1.000 0.316 0.004 Shira 0.010 0.138 0.530 0.316 1.000 0.149 Tarsan 0.001 0.327 0.119 0.004 0.149 1.000
On Nov 30, 2016, at 9:23 AM, marco....@gmail.com wrote:
Dear Mike,
Thanks for your reply, it was helpful, but I still have some issues, probably related to my lack of knowledge and understanding.
Here I report my results:
## I remove allometric effect and calculate pairwise between LS means
Shape <- arrayspecs(resid(lm(two.d.array(coords)~size) + predict(lm(two.d.array(coords) ~ 1)), 16, 2)
The results seems a bit different between the two approaches; I understand that when removing allometric effect I am comparing LS means, while in the second approach I compare the slope of the covariate. In the first approach most of my lakes differ in terms of mean shape, if I understood it correctly, but how do I correctly interpret the results? And do they suggest similar results?
Marco
On Wednesday, November 30, 2016 at 1:09:38 PM UTC, Michael Collyer wrote:
Marco,Using the residuals of shape regressed against log size for intergroup comparisons (using ANOVA) or performing ANOVA on shape with log size as a covariate should produce consistent results provided that in the latter, you add the covariate to a model first and use sequential (type 1) sums of squares and cross-products (which geomorph does).The caveat is important because when using sequential SSCP, the lake effect would be estimated given that the size effect has already been estimated. Also, keep in mind that the coefficients and SS in an ANOVA table will not be exactly the same with the two approaches, but should be comparable. The reason for this is with the former approach, one estimates an intercept twice and in the latter, only once.Finally, if performing the former approach, adding the mean shape to the residuals is a good idea. This does not change any ANOVA results, but allows one to make TPS deformation grids for e.g., group means, which make sense with respect to the mean shape.As a personal preference, I prefer using log(size) as a covariate in my analyses and comparing LS means. I might use the residuals of shape regressed against log size before generating a plot of principal component scores, if visually comparing means is my intention. (One could also do a between-group PCA.) But the reason for using it as a covariate is that I can also have a log(size) * group interaction in my model, initially, to ascertain if I should even be comparing means in the first place. (If significant, then comparing allometric trends is more appropriate.)Hope this helps!Mike
Dear all,
I have a question regarding allometric effect. I have a bunch of fish of the same species from different lakes, and I want to see if their shape change according to lake. The size of the fish changes from lake to lake, because in some of them there are only juveniles, has they have been introduced in the lakes recently.
I am faced with two options, either discarding the allometric effect by using the residuals of Shape ~ log(Size), or use size (log centroid size) as a covariate.
Which approach is more correct or valid or reliable?
Thanks in advance for your help.
Marco--
You received this message because you are subscribed to the Google Groups "geomorph R package" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geomorph-r-package+unsub...@googlegroups.com.
To post to this group, send email to geomorph-...@googlegroups.com.
Visit this group at https://groups.google.com/group/geomorph-r-package.
To view this discussion on the web, visit https://groups.google.com/d/msgid/geomorph-r-package/6777f54d-d404-4441-8ca2-02dfed5ac672%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "geomorph R package" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geomorph-r-pack...@googlegroups.com.
To post to this group, send email to geomorph-...@googlegroups.com.
Visit this group at https://groups.google.com/group/geomorph-r-package.
To view this discussion on the web, visit https://groups.google.com/d/msgid/geomorph-r-package/afcc2434-74f7-4fba-9278-535da8c6fcc4%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to geomorph-r-package+unsubscri...@googlegroups.com.
To post to this group, send email to geomorph-...@googlegroups.com.
Visit this group at https://groups.google.com/group/geomorph-r-package.
To view this discussion on the web, visit https://groups.google.com/d/msgid/geomorph-r-package/6777f54d-d404-4441-8ca2-02dfed5ac672%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "geomorph R package" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geomorph-r-package+unsub...@googlegroups.com.
To post to this group, send email to geomorph-...@googlegroups.com.
Visit this group at https://groups.google.com/group/geomorph-r-package.
To unsubscribe from this group and stop receiving emails from it, send an email to geomorph-r-pack...@googlegroups.com.
To post to this group, send email to geomorph-...@googlegroups.com.
Visit this group at https://groups.google.com/group/geomorph-r-package.
To view this discussion on the web, visit https://groups.google.com/d/msgid/geomorph-r-package/f067fa29-77c0-470e-aeb1-9d814d62da84%40googlegroups.com.
Call:
procD.allometry(f1 = shape ~ cs, f2 = ~species, logsz = TRUE,
iter = 499, RRPP = TRUE, print.progress = FALSE, data = gdf)
Homogeneity of Slopes Test
Df SSE SS R2 F Z Pr(>F)
Common Allometry 72 0.24375
Group Allometries 66 0.21947 0.024281 0.03583 1.217 1.2839 0.01 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
The null hypothesis of parallel slopes is rejected
based on a signficance criteron of alpha = 0.05
Based on the results of this test, the following ANOVA table is most appropriate
Type I (Sequential) Sums of Squares and Cross-products
Randomized Residual Permutation Procedure Used
500 Permutations
Df SS MS Rsq F Z Pr(>F)
log(size) 1 0.14561 0.145613 0.21487 43.789 12.3948 0.002 **
species 6 0.28830 0.048051 0.42544 14.450 6.6791 0.002 **
log(size):species 6 0.02428 0.004047 0.03583 1.217 1.3039 0.006 **
Residuals 66 0.21947 0.003325
Total 79 0.67767
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
--
You received this message because you are subscribed to the Google Groups "geomorph R package" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geomorph-r-pack...@googlegroups.com.
To post to this group, send email to geomorph-...@googlegroups.com.
Visit this group at https://groups.google.com/group/geomorph-r-package.
To view this discussion on the web, visit https://groups.google.com/d/msgid/geomorph-r-package/9df50639-fb7f-4caf-934b-f9aab7d170dd%40googlegroups.com.
If group structure is to be considered, size correction should be based on pooled within-group regression. This results in a reduction of shape variation within groups, which sometimes can lead to a substantial increase in the separation of groups."
I have a few comments to share in this regard. Pooled within-group approaches do not take into account differing slopes. In fact, they provide a misleading feeling that they are doing things correctly, when in this case they are absolutely not. Mike provided some cogent thoughts on this, but I’d like to re-iterate some in a different manner, as this is a common question and source of confusion to many.
First, if there is evidence of slope differences in mancova (as is found from the significant size:group interaction term in Sergio’s example in this thread), then the biological question of interest is how these slopes differ. Are there large differences in how the allometries are oriented in shape space? Are some different but others not? Are they statistically different in mancova but effectively oriented in the same direction? Etc. This is the type of pattern that one should be investigating once a significant size:group interaction has been identified, using tests of angles between allometry vectors etc. (see advanced.procD.lm). Note that this is the case even if the original intent of the test was to compare groups while accounting for allometry. In other words, the data have changed the question from a comparison of group means to a comparison of group slopes.
Now, one might still insist on the group mean comparison, and try to identify a way to do so. But an important point is that when allometric trajectories are in fact different, there is no mathematical way to properly ‘correct’ for these and subsequently perform a group mean comparison using manova: all methods one can envision are in fact nonsensical. Specifically, residuals from any adjustment in these cases are incommensurate with one another across groups, and do not properly account for the allometry in those groups. A few example implementations illustrate why this is the case.
1: Say one decides to fit a common regression line to all groups, obtain residuals and do manova to compare groups. Here all residuals are from a common regression model, so they represent the same thing relative to that model. However, because the groups have different allometric slopes, this single, common slope model does not represent the actual allometry in any of the groups. Thus, the residuals from the common model still contain part of the allometric effects in each group, and have are missing parts of non-allometric effects which were attributed to the predicted values. This occurs because the common allometry trajectory is oriented differently from the individual group allometries, so any residuals miss and gain parts of the shape variation through the procedure (draw on paper a bivariate regression line and a second line: add residual lines vertically and you will see what is ‘missed’ and ‘gained.’ So this method will not do what is intended.
2: Say one decides to do separate regressions for each group and obtain residuals for a comparison of groups. Here one has accounted for each species’ regression separately, so within species one has the ‘correct’ allometry-free residuals. But since the slopes of the groups are different the residuals from these separate regressions are not based on the same thing: they are residuals from different multivariate vectors [allometries] traversing shape space. Thus, any subsequent comparison of these is not useful, as the residuals across groups represent different things and are effectively apples and oranges. So this method will not do what is intended.
3: Say one fits a common model using some pooled within-group covariance procedure, and obtains residuals from this for group comparisons. This approach is also flawed, because a pooled within-group model assumes that all within-group patterns are oriented in the same direction and of the same magnitude. Yet the from test of slopes we know that this is not the case. Thus, residuals from this procedure are not residuals from the actual allometric patterns: these residuals still contain some allometric effects within each species, and part of the non-allometric effects have been removed (as in example #1). So this method will not do what is intended.
In the end, regardless of which approach one uses, if the groups have differing allometric trajectories (as evidenced by the significant interaction and subsequent angle tests to confirm that the statistical effect is biologically meaningful), there is simply no reasonable way to obtain allometric residuals to compare the groups. Instead (like Mike recently stated), one must test for how the allometric slopes differ. The data have changed your question from examining mean differences among groups to examining differences in group slopes.
Dean
Dr. Dean C. Adams
Professor
Department of Ecology, Evolution, and Organismal Biology
Department of Statistics
Iowa State University
www.public.iastate.edu/~dcadams/
phone: 515-294-3834
From: geomorph-...@googlegroups.com [mailto:geomorph-...@googlegroups.com]
On Behalf Of Mike Collyer
Sent: Wednesday, April 5, 2017 5:53 AM
To: Sergio Ferreira Cardoso <sff.c...@campus.fct.unl.pt>
Cc: geomorph R package <geomorph-...@googlegroups.com>
Subject: Re: [geomorph-r-package] Re: Allometric effect
Sergio,
From what I can gather from the MorphoJ, the pooled within-group regression in MorphoJ is the same as doing the following with geomorph.
fit <- procD.lm(shape ~ group)
R <- fit$residuals
PWA <- procD.allometry(R ~ Csize)
In other words, residuals are first obtained by accounting for different group means. This has the effect of removing differences in intercepts - not slopes - for different groups, which will make residuals smaller. It does not in any way account for different intragroup allometric patterns. In my reading of the MorphoJ user guide, it seems the motivation for doing this is to have group mean-correction so that one might visualize differences in slopes in plots with regression scores, rather than explicitly correcting for size in groups that have different allometries. (The user guide makes mention that a common allometry and group allometries cannot be expected to be the same. However, it does not explicitly warn against size correction with group structure, which I find unfortunate.)
Quite simply, whether encouraged by the MorphoJ user guide, or otherwise, users who use the pooled within-group regression in MorphoJ as a form of allometric correction and expect the results to somehow correct for different allometries are misguided. Our position with procD.allometry is one should know whether allometries are unique of common, and can apply analyses appropriately.
Emma Sherratt knows more about MorphoJ and can enlighten me and the group if I did not understand the intention of the pooled within-group regression. I do not use MorphoJ, so my interpretation is based simply on the guide, and not any empirical evidence.
Mike
On Apr 5, 2017, at 3:59 AM, Sergio Ferreira Cardoso <sff.c...@campus.fct.unl.pt> wrote:
To view this discussion on the web, visit https://groups.google.com/d/msgid/geomorph-r-package/16EA985A-D774-4B25-B3B6-E18916F879CF%40gmail.com.
> advanced.procD.lm(shape ~ logcs, ~logcs+species,
+ groups = ~species, slope = ~logcs, angle.type = "deg",
+ iter = 199, data = gdf, print.progress = FALSE)
Call:
advanced.procD.lm(f1 = shape ~ logcs, f2 = ~logcs + species,
groups = ~species, slope = ~logcs, angle.type = "deg", iter = 199, print.progress = FALSE, data = gdf)
Randomized Residual Permutation Procedure Used
200 Permutations
ANOVA Table
Df SSE SS R2 F Z Pr(>F)
~logcs 78 0.53206
~logcs + species 72 0.24375 0.2883 0.42544 14.193 6.2097 0.005 **
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
##P-values for contrasts in slope vector lengths
P-values
cra gig jav pen tem tet tri
cra 1.000 0.745 0.585 0.465 0.760 0.705 0.865
gig 0.745 1.000 0.855 0.670 0.900 0.830 0.840
jav 0.585 0.855 1.000 0.765 0.760 0.740 0.950
pen 0.465 0.670 0.765 1.000 0.670 0.675 0.910
tem 0.760 0.900 0.760 0.670 1.000 0.755 0.970
tet 0.705 0.830 0.740 0.675 0.755 1.000 0.900
tri 0.865 0.840 0.950 0.910 0.970 0.900 1.000
##P-values for angles between slope values
P-values
cra gig jav pen tem tet tri
cra 1.000 0.635 0.535 0.805 0.655 0.760 0.615
gig 0.635 1.000 0.615 0.500 0.630 0.820 0.955
jav 0.535 0.615 1.000 0.535 0.730 0.655 0.750
pen 0.805 0.500 0.535 1.000 0.730 0.765 0.525
tem 0.655 0.630 0.730 0.730 1.000 0.695 0.845
tet 0.760 0.820 0.655 0.765 0.695 1.000 0.715
tri 0.615 0.955 0.750 0.525 0.845 0.715 1.000
Begin forwarded message:
From: Mike Collyer <mlco...@gmail.com>Subject: Re: [geomorph-r-package] Re: Allometric effectDate: April 5, 2017 at 1:52:54 PM EDTTo: Sergio Ferreira Cardoso <sff.c...@campus.fct.unl.pt>
Sérgio,I would not say you had contrasting results. Your interaction was significant; however, your R^2 for the common slope was 0.215 and for the unique slopes, 0.035. As such, the effect size for the former was 12.4 sd and for the latter, 1.3 sd. Your statistically significant effect is not biologically significant. Thus, with 7 species, a bunch of really small differences compiled a small but significant overall effect. These are not contrasting results, unless you use a P-value as a diagnostic tool, which many recommend never to do.Dean mentioned this before, “… if the groups have differing allometric trajectories (as evidenced by the significant interaction and subsequent angle tests to confirm that the statistical effect is biologically meaningful)…” OK, you had reason to believe based on your level 1 analysis that this was true, but the effect was small. The level 2 analysis should convince you that the biological significance is not there. If it were me, I would use these results as argument that a common allometry is okay, maybe get allometry-free residuals or shapes, and compare species means.I hope everyone realizes that this process is important. As Dean said, your data help to support which questions you should ask. You learned that comparing allometries does not offer much; comparing species means while accounting for the large amount of shape-size covariation is probably what you want to do.Hope that helps!Mike
quarta-feira, 30 de Novembro de 2016 às 10:47:03 UTC+1, marco....@gmail.com escreveu:Dear all,
I have a question regarding allometric effect. I have a bunch of fish of the same species from different lakes, and I want to see if their shape change according to lake. The size of the fish changes from lake to lake, because in some of them there are only juveniles, has they have been introduced in the lakes recently.
I am faced with two options, either discarding the allometric effect by using the residuals of Shape ~ log(Size), or use size (log centroid size) as a covariate.
Which approach is more correct or valid or reliable?
Thanks in advance for your help.
Marco
--
You received this message because you are subscribed to the Google Groups "geomorph R package" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geomorph-r-pack...@googlegroups.com.
To post to this group, send email to geomorph-...@googlegroups.com.
Visit this group at https://groups.google.com/group/geomorph-r-package.
To view this discussion on the web, visit https://groups.google.com/d/msgid/geomorph-r-package/0f383a77-259a-4b07-8014-f56d6c3db234%40googlegroups.com.
advanced.procD.lm(shape ~ logcs, ~logcs+species,
groups = ~species, slope = ~logcs, angle.type = "deg",
iter = 199, data = gdf, print.progress = FALSE)
advanced.procD.lm(shape ~ logcs+species, ~logcs*species,
groups = ~species, slope = ~logcs, angle.type = "deg",
iter = 199, data = gdf, print.progress = FALSE)
Mike
To unsubscribe from this group and stop receiving emails from it, send an email to geomorph-r-package+unsub...@googlegroups.com.
Hi everyone,
I am still
quite new to morphometrics and I have done a couple of pilot studies
investigating allometry effects of ear shape across populations and I greatly
appreciate this thoughtful discussion across this thread. Being that I am new
to morphometrics with no formal training, other than self-guided learning, I’m
quite concerned that I too have been misinterpreting the results of these allometric
/ shape analyses. So I would like to ask the community if I am proceeding in
the correct direction or if I should change my approach…
I’ve conducted a pilot study involving 2D data on ear shape for several different populations. My hypothesis is simply that ear shape differs by population. Here are some outputs I get from the Geomorph package in R.
procD.lm(f1 = Allometry$formula,iter = 499, RRPP = TRUE, data = Allometry$data)
Type I (Sequential) Sums of Squares and Cross-products
Randomized Residual Permutation Procedure Used
500 Permutations
Df SS MS Rsq F Z Pr(>F)
size 1 0.009615 0.0096148 0.041275 5.4245 4.1971 0.002 **
Residuals 126 0.223331 0.0017725
Total 127 0.232945
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
procD.allometry(f1 = coords ~ Csize, f2 = ~classifier$pop, logsz = FALSE, iter = 499, RRPP = TRUE, data = gdf)
Homogeneity of Slopes Test
Df SSE SS R2 F Z Pr(>F)
Common Allometry 115 0.19045
Group Allometries 104 0.17304 0.017402 0.074703 0.9508 1.0118 0.39
The null hypothesis of parallel slopes is supported
based on a signficance criteron of alpha = 0.05
Based on the results of this test, the following ANOVA table is most appropriate
Type I (Sequential) Sums of Squares and Cross-products
Randomized Residual Permutation Procedure Used
500 Permutations
Df SS MS Rsq F Z Pr(>F)
size 1 0.009615 0.0096148 0.041275 5.8059 4.1971 0.002 **
classifier$pop 11 0.032885 0.0029896 0.141172 1.8052 1.6674 0.002 **
Residuals 115 0.190445 0.0016560
Total 127 0.232945
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
My original
interpretation of these results was that size alone had a significant effect on
the shape of the ear but when population is also included, as a grouping factor, there
was an interaction between size and shape for each population. These results
suggest that each population has a different shape due to an interaction with
allometry. Is this a fair interpretation of these results?
So if I understand this correctly… My data, and the available analyses in geomorph, won’t allow me to say much about these shape differences by population other than to say that each population seems to have its own allometric patterns. This is because my data separates out into parallel slopes (as is the case in the above figure); is this correct? If these slopes were not parallel, this would indicate a similar allometric trajectory (for each population) which would suggest that any difference in shape is the result of size independent population effects; is this correct?
So strictly speaking my hypothesis would be supported, but this leads to questions regarding why are the allometries different?
I am currently planning to revisit this data but with the addition of another dimension (3D), and as I understand it, if I am on the right track I can essentially use the same approach but with the added dimension; is this correct? And if the parallel allometries appear again (which I anticipate they will since they are present in 2D) the interpretation would be the same.
Any insights would be helpful, thank you in advance for your time – Cheers.
Jeremy
--
You received this message because you are subscribed to the Google Groups "geomorph R package" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geomorph-r-pack...@googlegroups.com.
To post to this group, send email to geomorph-...@googlegroups.com.
Visit this group at https://groups.google.com/group/geomorph-r-package.
To view this discussion on the web, visit https://groups.google.com/d/msgid/geomorph-r-package/53d951db-4c7f-4e59-99cd-f32e7775fe5c%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to geomorph-r-package+unsub...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to geomorph-r-pack...@googlegroups.com.
To post to this group, send email to geomorph-...@googlegroups.com.
Visit this group at https://groups.google.com/group/geomorph-r-package.
To view this discussion on the web, visit https://groups.google.com/d/msgid/geomorph-r-package/f48a89ea-293e-497e-82b8-665ae443af62%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to geomorph-r-package+unsubscri...@googlegroups.com.
To post to this group, send email to geomorph-...@googlegroups.com.
Visit this group at https://groups.google.com/group/geomorph-r-package.
To view this discussion on the web, visit https://groups.google.com/d/msgid/geomorph-r-package/53d951db-4c7f-4e59-99cd-f32e7775fe5c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "geomorph R package" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geomorph-r-package+unsub...@googlegroups.com.
To post to this group, send email to geomorph-...@googlegroups.com.
Visit this group at https://groups.google.com/group/geomorph-r-package.
> gdfALLOMETRY <- geomorph.data.frame(shape = pilosa.gpa$coords, cs = pilosa.gpa$Csize, gp = a$sp)
> pilosaAllometry <- procD.allometry(shape~cs, ~gp, logsz = TRUE, data=gdfALLOMETRY, iter=999, print.progress = FALSE)
Homogeneity of Slopes Test
Allometry Model
> summary(pilosaAllometry)
Call:
procD.allometry(f1 = shape ~ cs, f2 = ~gp, logsz = TRUE, iter = 999, print.progress = FALSE, data = gdfALLOMETRY)
Homogeneity of Slopes Test
Df SSE SS R2 F Z Pr(>F)
Common Allometry 159 0.55177
Group Allometries 153 0.52378 0.027985 0.020186 1.3624 -0.56748 0.7155
The null hypothesis of parallel slopes is
supported
based on a significance criterion of alpha = 0.05
Based on the results of this test, the following ANOVA table is most appropriate
Type I (Sequential) Sums of Squares and Cross-products
Randomized Residual Permutation Procedure Used
1000 Permutations
Df SS MS Rsq F Z Pr(>F)
log(size) 1 0.24828 0.24829 0.17909 71.547 9.3804 0.001 **
gp 6 0.58632 0.09772 0.42292 28.159 17.6800 0.001 **
Residuals 159 0.55177 0.00347
Total 166 1.38637
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
> pilosaAnova <- procD.lm(pilosaAllometry$formula, data = pilosaAllometry$data, iter = 999, RRPP=TRUE, print.progress = FALSE)
> shape.resid <- arrayspecs(pilosaAnova$residuals, p=dim(pilosa.gpa$coords)[1], k=dim(pilosa.gpa$coords)[2])
> #Allometry-free shapes
> adj.shape <- shape.resid + array(pilosa.gpa$consensus, dim(shape.resid))
> PCA_allo <- plotTangentSpace(adj.shape, axis1 = 1, axis2 = 2, groups = gp, legend = FALSE)
model <- procD.allometry(shapeR~sizeR, logsz = FALSE, data=gdfmodel, iter=999, print.progress = FALSE)
Error in procD.allometry(shapeR ~ sizeR, logsz = FALSE, data = gdfmodel, :
Size cannot be negative if using log-transformation
--
You received this message because you are subscribed to the Google Groups "geomorph R package" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geomorph-r-pack...@googlegroups.com.
To post to this group, send email to geomorph-...@googlegroups.com.
Visit this group at https://groups.google.com/group/geomorph-r-package.
To view this discussion on the web, visit https://groups.google.com/d/msgid/geomorph-r-package/9a1438a5-e4ac-4d1a-869f-2e42b6cb20cf%40googlegroups.com.
Hello everyone,
The discussion on this topic was very useful and I would like to say thanks to all of you for clearing the concepts of allometry more briefly to everyone. I have just a few questions regarding the results I have obtained that am not so sure if I am interpreting them correctly. I have four groups of fish from different geographic locations and I wanted to inspect their allometric patterns as well as to check the HOS test in order to justify the inclusion of allometry – free shape residuals in further analysis. The obtained results are:
procD.allometry(f1 = shape ~ logcs, f2 = ~group, iter = 999, data = gdf)
Homogeneity of Slopes Test
ResDf RSS SS MS Rsq F Z P Pr(>F)
Common Allometry 934 0.42744
Group Allometries 931 0.41227 0.015177 0.0050588 0.032153 11.424 8.6771 0.001
Total 938 0.47201 938
The null hypothesis of parallel slopes is supported
based on a significance criterion of alpha = 0.05
Based on the results of this test, the following ANOVA table is most appropriate
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)
log(size) 1 0.02476 0.0247627 0.05246 54.109 8.3210 0.001 **
group 3 0.01981 0.0066032 0.04197 14.429 9.0735 0.001 **
Residuals 934 0.42744 0.0004576 0.90557
Total 938 0.47201
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
The results showed no significant interaction between size and group and the null hypothesis of parallel slopes is supported, as stated by the HOS test and shown with the plot. This justifies the inclusion of allometry – free shape residuals in further analysis.
However, the obtained P value is 0.001 and the HOS test is still stating that the null hypothesis is supported. I don’t know if I am missing something, but if p value is < 0.05, shouldn’t the null hypothesis be rejected?
They also displayed that a group effect is significant, meaning that at any given size, there is a significant variation in shape among group levels. Or more specifically the results display significant shape allometry where each group level has the same allometric pattern but there is a shape variation in the different group level. When looking at the plot, groups 2-3-4 do not differ much in shape at any given size, but group 1 is more apart from them meaning they differ more in shape at any given size. When observing the direction of the parallel lines can it be stated that there is significant amount of shape change per unit of size change going on. For instance, if those allometric vectors were parallel with the size axis then the amount of shape change would be negligible per unit of size change. Is this reasoning good or not on the right track?
Thank you for your time and consideration.
Sincerely,
Igor
Igor,
Try installing the latest version of geomorph and running again. There was a bug some time ago in that toggle, which has been fixed.
Note: I just ran the example from the help file of geomorph version 3.0.7, and confirmed that when the group allometry term is significant, it does provide the full model containing the interaction term.
Dean
Dr. Dean C. Adams
Director of Graduate Education, EEB Program
Professor
Department of Ecology, Evolution, and Organismal Biology
--
You received this message because you are subscribed to the Google Groups "geomorph R package" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
geomorph-r-pack...@googlegroups.com.
To post to this group, send email to
geomorph-...@googlegroups.com.
Visit this group at
https://groups.google.com/group/geomorph-r-package.
To view this discussion on the web, visit https://groups.google.com/d/msgid/geomorph-r-package/5dd303b4-0224-4ca0-aad1-85a725c82e6c%40googlegroups.com.
Dear Dr. Adams,
I have done steps according to your suggestion and still got the same results as I previously displayed where the P (Pr > F) is still 0.001 but the model states: “The null hypothesis of parallel slopes is supported based on significance criterion of alpha = 0.05”. The interaction term isn’t displayed in the ANOVA table.
Is this still a bug, or am I getting some results that aren’t meaningful? If there are correct, wouldn’t the result p value indicate that the model should be rejected? But when you look at the plot the slopes are parallel so I don’t know what to think or how to report the results regarding allometry.
Thank you for your given time and consideration.
Sincerely,
Igor
To unsubscribe from this group and stop receiving emails from it, send an email to geomorph-r-package+unsub...@googlegroups.com.
To post to this group, send email to geomorph...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to geomorph-r-pack...@googlegroups.com.
To post to this group, send email to geomorph-...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/geomorph-r-package/9ae5f17d-975f-4e09-afd9-d43416b8dbe7%40googlegroups.com.
Mike
To unsubscribe from this group and stop receiving emails from it, send an email to geomorph-r-package+unsubscri...@googlegroups.com.
To post to this group, send email to geomorph...@googlegroups.com.
Visit this group at https://groups.google.com/group/geomorph-r-package.
To view this discussion on the web, visit https://groups.google.com/d/msgid/geomorph-r-package/5dd303b4-0224-4ca0-aad1-85a725c82e6c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "geomorph R package" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geomorph-r-package+unsub...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to geomorph-r-pack...@googlegroups.com.
To post to this group, send email to geomorph-...@googlegroups.com.
Visit this group at https://groups.google.com/group/geomorph-r-package.
To view this discussion on the web, visit https://groups.google.com/d/msgid/geomorph-r-package/66f260bc-1b31-4f6d-86ec-4df7d0099500%40googlegroups.com.
Igor,
To unsubscribe from this group and stop receiving emails from it, send an email to geomorph-r-package+unsub...@googlegroups.com.
To post to this group, send email to geomorph-...@googlegroups.com.
Visit this group at https://groups.google.com/group/geomorph-r-package.
HOS<-advanced.procD.lm(shape ~ log(cs)+gp, ~log(cs)*gp, groups = ~gp, slope = ~log(cs), angle.type = "deg", iter = 9999, data = gdf, print.progress = FALSE)
Warning: Because variables in the linear model are redundant,the linear model design has been truncated (via QR decomposition).Original X columns: 12Final X columns (rank): 11Check coefficients or degrees of freedom in ANOVA to see changes.
Error in pairwise(pfitF, fit.null = pfitR, groups = gp, covariate = covariate, : The groups factor does not have replication at each level.
Igor,
To unsubscribe from this group and stop receiving emails from it, send an email to geomorph-r-package+unsub...@googlegroups.com.
To post to this group, send email to geomorph-...@googlegroups.com.
Visit this group at https://groups.google.com/group/geomorph-r-package.
To unsubscribe from this group and stop receiving emails from it, send an email to geomorph-r-pack...@googlegroups.com.
To post to this group, send email to geomorph-...@googlegroups.com.
Visit this group at https://groups.google.com/group/geomorph-r-package.
To view this discussion on the web, visit https://groups.google.com/d/msgid/geomorph-r-package/7b47c27e-4fa1-4df8-aab0-a9e7a44ea6f7%40googlegroups.com.
Dear all,
I have a question that is puzzling me some time now regarding allometry, specifically homogeneity of slopes test (HOS) and phenotypic trajectory analysis (PTA) and I hope someone can shed light on this topic.
In my case, I have fish population that dwell in habitats that are rich and poor in food resources and I want to statistically evaluate the variance and covariance of variables associated with the population-environment interaction. HOS test rejected the hypothesis of parallel slopes so I applied advanded.procD.lm function in order to see if one or more populations undergo more shape change per unit centroid size that others, do they develop at the same rate but undergo different changes in shape or do they display the combination of angular differences in allometric slopes and vector length differences.
Few populations displayed combination of angular differences in allometric slopes and vector length differences, meaning that they have different allometric trajectories. Because of that there is no reasonable way to obtain allometric residuals to compare the groups, so does that mean that I have to add centroid size as a covariate in the PTA analysis? If so, don’t HOS and PTA display kind of the same thing? To my best understanding, both approaches can be used to establish patterns of direction and magnitude of shape change with size by testing for differences in slope angle and length, but they visualise different aspects of the results where HOS visualise them in size-shape space and PTA in morphospace.
Thank you for your given time and effort.
Igor,
Please see the help file for trajectory.analysis. This function allows one to include additional covariates using the ‘f2’ argument.
Dean
Dr. Dean C. Adams
Director of Graduate Education, EEB Program
Professor
Department of Ecology, Evolution, and Organismal Biology
Iowa State University
phone: 515-294-3834
From: geomorph-...@googlegroups.com <geomorph-...@googlegroups.com>
On Behalf Of Igor Talijancic
Sent: Tuesday, February 5, 2019 3:28 AM
To: geomorph R package <geomorph-...@googlegroups.com>
Subject: [geomorph-r-package] Re: Allometric effect
Dear all,
--
You received this message because you are subscribed to the Google Groups "geomorph R package" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
geomorph-r-pack...@googlegroups.com.
To post to this group, send email to
geomorph-...@googlegroups.com.
Visit this group at
https://groups.google.com/group/geomorph-r-package.
To view this discussion on the web, visit https://groups.google.com/d/msgid/geomorph-r-package/0c333c56-aca2-4a54-bf25-d18f5c0f4bd0%40googlegroups.com.
A numeric vector for which to calculate slopes for comparison If NULL, LS means will be calculated instead of slopes.
Currently you are testing for the difference in LS means which is not equivalent. Also, I prefer to indicate a fit.null model in the formula. I usually use a model like your fit.common model as the null is the ANOVA shows that is significantly different from the simple common allometry model without covariates.
After you performed the pairwise test, you can easily obtain both absolute differences and angular differences between the slopes using the summary function.
You can find all the details on this and the reasoning behind using a covariate in the pairwise help file:
https://rdrr.io/cran/RRPP/man/pairwise.html
Hope this helps!
Agnese