Projection in allometry

40 views
Skip to first unread message

Stylianos Koutalis

unread,
Jun 19, 2025, 8:40:47 AMJun 19
to geomorph R package
Dear all,

I have recently encountered a dilemma. Considering some extant genera with species, one would like to investigate where a fossil scores along the allometric trends revealed by the regression  (shape~size), at the genus or species level. Would it be appropriate to calculate the coefficients of the OLS with the fossil, or rather to acquire the allometric vector for the extant sample and project the fossil coordinates along it? The same holds when using a GLS covariance for the extant. In this case, it would be trivial to use the fossil and extant altogether since phylogenetic relationships may not be clear, so the projection would make sense.  And this is another topic on its own. What exactly do we gain when using the Cov matrix in an allometry regression? The results are different in any case by default.

Below are some examples to demonstrate the influence of choices using the "plethspecies" dataset. I have used as "unknown" taxa the P_virginia and P_shenandoah. Black dots are the supposedly unknown ones. Red and blue depict a random assignment of genus level for visualization purposes of the "extant" samples. Thank you in advance for your time!!

data(plethspecies)
Y.gpa <- gpagen(plethspecies$land)    #GPA-alignment
gdf <- geomorph.data.frame(Y.gpa, phy = plethspecies$phy)

coords_ext<-gdf$coords[,,1:7]
size_ext<-gdf$Csize[1:7]
genus_ext<-c(rep("A",4), rep("B",3))
tree_pruned <- drop.tip(gdf$phy, c("P_virginia","P_shenandoah"))

coords_unk<- gdf$coords[,,8:9]
size_unk<-gdf$Csize[8:9]
genus_unk<-rep("X",2)

Best,
Stelios
GLS projection.png
OLS simultaneous calc.png
OLS with projection.png

Adams, Dean [EEOB]

unread,
Jun 20, 2025, 3:26:04 AMJun 20
to geomorph R package
Stelios,

While your question appears to be one of prediction, there are some components that are unclear in the intent.

With linear model prediction (as in the case of allometry: Shape ~ Size), one performs a linear model with the known specimens, and makes predictions of the unknown specimens based on that linear model. That would allow one to predict the shape of a specimen given its size. However, it seems that you already have your fossil specimens, which means you would know their shape and their size. So it is unclear to me precisely what it is you wish to predict. 

As for the 'Cov' option, this component in RRPP is to incorporate an object covariance matrix. This could be expected covariances among objects due to phylogeny, geography, temporal sampling, etc.  In essence, it enables one to perform GLS rather than OLS (the latter assumes observations are independent while the former does not).

Dean

--
Dr. Dean C. Adams
Distinguished Professor​Organismal Biology
Iowa State University

From: geomorph-...@googlegroups.com <geomorph-...@googlegroups.com> on behalf of Stylianos Koutalis <styliano...@gmail.com>
Sent: Thursday, June 19, 2025 7:40 AM
To: geomorph R package <geomorph-...@googlegroups.com>
Subject: [geomorph-r-package] Projection in allometry
 
--
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 view this discussion, visit https://groups.google.com/d/msgid/geomorph-r-package/fa493d39-c12c-4f33-916e-2d024278e954n%40googlegroups.com.

Stylianos Koutalis

unread,
Jun 20, 2025, 5:27:18 AMJun 20
to geomorph-...@googlegroups.com
Dear Professor,

Thanks for the reply. So, not exactly. Given a regression shape~size*genus for example, the coefficients are, i) the intercept for the first group (for size=0), ii) size (slope of the first group), iii) group2, iv) group3 - intercept differences for groups 2 and 3 from group 1 - and size:group2, vi) size:group3 their slopes. Then, in order to acquire the regression scores, we use this

 f <- as.matrix(fit$LM$gls.fitted)
Pcov <- RRPP:::Cov.proj(as.matrix(fit$LM$Cov))
xc <- size_extant
X <- as.matrix(cbind(xc, Pcov %*% fit$LM$X))
b <- as.matrix(lm.fit(X, f)$coefficients)[1, ]
regscores_extant<- as.numeric(RRPP:::center((fit$LM$Y) %*% b %*% sqrt(solve(crossprod(b)))))

I was asking, given these calculations, "b" the allometric vector, if it would make sense to apply this:
regscores_fossils<- as.numeric(RRPP:::center((fossil_shape_coords) %*% b %*% sqrt(solve(crossprod(b))))), for the same "b" that describes the extant taxa.

I definitely miss something, for that I am sure, but does the actual reasoning make sense? The same could be applied to an OLS model

Thank you in advance!
Best,
Stelios



You received this message because you are subscribed to a topic in the Google Groups "geomorph R package" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/geomorph-r-package/96Oq9091ayU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to geomorph-r-pack...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/geomorph-r-package/SJ0PR04MB8306A19FAA1571F7E31CBA38A27CA%40SJ0PR04MB8306.namprd04.prod.outlook.com.

Adams, Dean [EEOB]

unread,
Jun 20, 2025, 5:34:17 AMJun 20
to geomorph-...@googlegroups.com
Sorry, I still do not understand the intent. Do you wish to predict the genus to which the fossils belong?

Dean


Sent: Friday, June 20, 2025 11:27:04 AM
To: geomorph-...@googlegroups.com <geomorph-...@googlegroups.com>
Subject: Re: [geomorph-r-package] Projection in allometry
 

Stylianos Koutalis

unread,
Jun 20, 2025, 5:38:12 AMJun 20
to geomorph-...@googlegroups.com
I want to see in the regression scores plot where it falls, given the allometric relationships of other taxa, extant in this case.

Best,
Stelios

Adams, Dean [EEOB]

unread,
Jun 20, 2025, 5:47:35 AMJun 20
to geomorph-...@googlegroups.com
Ok, so why not simply run the regression with all taxa including fossils, make the plot, and add names as text? The predictions are already made from the linear model so it should be straightforward.  
Sent: Friday, June 20, 2025 11:37:58 AM

Stylianos Koutalis

unread,
Jun 20, 2025, 5:52:14 AMJun 20
to geomorph-...@googlegroups.com
Yes, this could be the case for the ols model, but considering the lack of phylogenetic information for the fossil, if I want to use the phylogenetic covariance matrix for the extant taxa alone for a gls? Or if we miss it, then is the ols the only choice? Thank you Professor!

Best,
Stelios

Adams, Dean [EEOB]

unread,
Jun 20, 2025, 6:04:02 AMJun 20
to geomorph-...@googlegroups.com
Technically one could make predictions via gla, but since the phylogenetic position of the fossil is not known, error of shape prediction is also conflated with error in phylogenetic position. It is hard to decide a way of disentangling those without other quantitative information or making other assumptions about the data.
Sent: Friday, June 20, 2025 11:51:59 AM

Stylianos Koutalis

unread,
Jun 20, 2025, 6:09:38 AMJun 20
to geomorph-...@googlegroups.com
OK, then i should stick with the ols!! Thank you for your time Professor!

Best,
Stelios

Reply all
Reply to author
Forward
0 new messages