geomorphR/geomorph

Procrustes residuals values and partial warp scores

Closed this issue · 11 comments

Hello everyone,

I am currently trying to extract partial warp scores from my data but I am really not sure about the right method to do so in geomorph. I am using the 3.0.6 version.

To better understand how partial warp scores are estimated, I am trying to get the Procrustes residuals. To do so, I first calculated Procrustes residuals by hand (consensus configuration - landmark coordinates). Here is an example with the plethodon data :

data(plethodon)
Y.gpa <- gpagen(plethodon$land) # GPA-alignment
Y.gpa$consensus - Y.gpa$coords[,,1] # Procrustes residuals for the first individual

Here are the results I obtain :

              X             Y

[1,] -0.0344125269 0.0007795351
[2,] -0.0173644760 -0.0024695930
[3,] -0.0013939463 -0.0121645486
[4,] -0.0054344476 -0.0015275652
[5,] 0.0042459454 0.0009465181
[6,] -0.0085043603 0.0175240242
[7,] 0.0246763774 -0.0015201942
[8,] -0.0117064381 -0.0093034324
[9,] 0.0046035509 -0.0045212382
[10,] 0.0027063193 0.0035193421
[11,] 0.0417190925 -0.0199987873
[12,] 0.0008649097 0.0287359394

Then, I used the $data function of gpagen (returns a data frame with an n x (pk) matrix of Procrustes residuals and centroid size) to verify my results as follows :

Y.gpa$data[1,]

and obtained :

coords.X.1 coords.Y.1 coords.X.2 coords.Y.2 coords.X.3 coords.Y.3 coords.X.4 coords.Y.4 coords.X.5
1 0.1867449 -0.02601616 0.2106543 -0.09257173 -0.03230658 0.005234662 -0.2763898 >-0.08784332 -0.3149726
coords.Y.5 coords.X.6 coords.Y.6 coords.X.7 coords.Y.7 coords.X.8 coords.Y.8 coords.X.9 coords.Y.9
1 -0.05877959 -0.3174958 -0.04960619 -0.3422491 0.04157688 -0.1765378 0.1096506 >0.01698919 0.1033746
coords.X.10 coords.Y.10 coords.X.11 coords.Y.11 coords.X.12 coords.Y.12 Csize
1 0.1867616 0.07142079 0.3104119 0.08151401 0.54839 -0.09795449 15.22692

The results obtained with $data are actually the coordinates of landmarks after the GPA, not the Procrustes residuals.

Is this normal and can this impact other estimations made by geomorph?

Also, has anyone a method to calculate partial warp scores in geomorph?

Thanks a lot.

Thanks a lot for your answer Mike!

I was indeed confused and thought that Procrustes residuals were the deviations of the landmark
coordinates from the position of the respective landmarks in the average of all configurations, as represented by vectors on this type of plot :

plotRefToTarget(Y.gpa$consensus,Y.gpa$coords[,,1],gridPars=gridPar(pt.bg = "green", pt.size = 1),
method="vector",mag=2, label=T)

Thanks for the precision!

However, I am still unsure of how to obtain partial warp scores. Could I use Procrustes coordinates as a shape variable in my models since it contains information about how each individual deviates from the consensus shape?

Thanks a lot!

Thanks a lot for the very quick and helpful answers, it is really appreciated!

Cheers!

Philippine

I was also looking for a way to extract Procrustes residuals - is it better to use A (the aligned residuals) or Ahat (the predicted residuals)?

Hi Dean,
Sorry - what I'm really looking for is size-corrected Procrustes residuals. I've been using the procD.allometry function, and in the literature for that it says $A is the correct output for the Procrustes residuals. $Ahat is the predicted residuals - I'm not sure the difference.

Ultimately I want to do a DFA on these residuals. Originally Craig did a DFA on the partial warps, but the Rohlf paper (and you and Mike) suggests that Procrustes residuals will suffice. I'm trying to analyze some additional traits & compare them to what's already been done, so I want things to be as similar as possible (though I may end up recreating the DFA with the Procrustes residuals so I'm really comparing granny smith apples to granny smith apples).

Thanks for the prompt response - and for your help! I really appreciate it.

Thank you so so much!!!

Out of curiousity....can you explain what exactly the Residual Shape Component (RSC) is? This comes out of using the CAC method in procD.allometry.

I swear that's my last question for tonight.