# how to calculate observation within and between groups variances of PCA scores

I'm kind of new here, and also not a professional statistics guy, so sorry if the answer is obvious and I'm missing something, but I looked everywhere and couldn't figure it out.

I'm doing geometric morphometrics on 52 lithic artifacts. All the artifacts are of the same type but they come from the different sites (site A - 18 items, site B - 19, site C - 15). For each artifact I have a vector of 180 variables (namely 60 3D homologous landmarks).

I've run generalized Procrustes analysis GPA for scaling of the data and superimposition. Next, I use the superimposed coordinates in a principal component analysis (PCA). I get 51 principal components, the first 8 of which explain some 79% of the variance.

I understand that each of these components represents a shape trend (a prototypical shape), that is, a set of landmarks are linked and change together. The score of each artifact on each component represents a relative location on that trend. I can also draw a scatter plot of the first 2 components, which explain almost 50% of the variance and marks the artifacts from the different sites in different colors.

However, I would like to know the variance for each of these groups.

I know that if I calculate the variance of the entire sample, I get the eigenvalues each component, but is it correct to use the eigenvalues to calculate separate variances of the different groups?

If so, is there a multivariate method to combine (add?) all the variances of a single group to understand in general terms how variable is that group of artifacts in terms of shape?

Finally, is there a way to test whether differences in variances of the different groups are significant? Should I use LDA for that, and if so, should I use the original data or the PC scores?

You want the Procrustes variance, also called 'morphological disparity' in geometric morphometrics. You can compute Procrustes variances and test for significant differences among groups using the morphol.disparity function in the R package geomorph. The documentation for this function provides a mathematical definition of morphological disparity: