Dear Igor,

Yes, it is possible to use the package with traditional measurements. In this 
case, you still need to remove strong outliers and to reduce the data to the 
first principal components, but you can skip the step of the Procrustes 
superimposition, which is specific to geometric morphometric data. 

Also, you can't directly visualise shape patterns as grid deformation, but you 
can plot the loadings of the relative eigenvectors as a bar plot. For example, 
to plot the loadings of the first dimension resulting from the relative 
eigenanalysis of B with respect to W, the script looks like:

# Relative eigenanalysis
relEigenBW <- relative.eigen(B, W)

# Case 1: No reduction to the first PCs was done during data preparation => 
directly plot the loadings
di <- 1  # dimension
barplot(A.BW[, di], las = 2, main = paste("Dimension", di), cex.names = 0.9)

# Case 2: A reduction to the first PCs was done during data preparation => 
pre-multiply the loadings of the relative eigenanalysis by the loadings of the 
PCs obtained from the PCA performed during the data preparation
A.BW <- phen.pca$rotation %*% relEigenBW$relVectors  # pre-multiply the 
loadings of the relative eigenvectors
di <- 1  # dimension
barplot(A.BW[, di], las = 2, main = paste("Dimension", di), cex.names = 0.9)

Also, be careful with the effect of the allometry: depending of your research 
question, it can be relevant to remove it when the effect is very strong, to be 
able to detect shape variability due to other factors.

Best,

Anne
    Le lundi 22 mars 2021 à 10:25:24 UTC+1, Igor Talijančić 
<[email protected]> a écrit :  
 
 
Greetings!

 

I found your package veryuseful with great applicability in numerous studies 
regarding marine topics,such as investigating variability in fish populations. 
I have a questionrelated to the use of package beyond the GM data. Is it 
possible to usetraditional measurements as input, as in Bookstein and 
Mitteroecker (2014), or the computationalcode is different? 

 

Thanks.

 

Sincerely,

Igor

Dana srijeda, 31. srpnja 2019. u 12:48:32 UTC+2 korisnik 
[email protected] napisao je:

Dear Patrick,

Not exactly. The between-group covariance matrix B for a set of related 
populations (obtained with cov.B) corresponds to phenotypic traits, but this is 
not the matrix P. Both P (for phenotype) and G (for genotype) are average 
within-population covariance matrices. G is an estimate of the additive genetic 
covariance matrix of the common ancestral population, but G is difficult to 
estimate, so we use P instead of G as the within-group covariance matrix W 
(obtained with cov.W). 

To summarize correspondances between matrices:
- W <-> P <-> G <-> estimate of the additive genetic covariance matrix of the 
common ancestral population
- B <-> between-group covariance matrix for a set of related populations

You can find more details about this in the section 'Stabilizing Versus 
Divergent Selection of Human Craniofacial Shape' in this reference:

Bookstein FL, Mitteroecker P (2014) Comparing Covariance Matrices by Relative 
Eigenanalysis, with Applications to Organismal Biology. Evolutionary Biology 
41, 336–350

I hope this is helpful. 

Best regards,

Anne 

    Le mardi 30 juillet 2019 à 14:52:18 UTC+2, lv xiao <[email protected]> a 
écrit :  
 
 Dear Dr. Anne,
Thank you very much for your clear explanation. May I please ask an additional 
question related to one of your recent publications entitled "Multivariate 
Comparison of Variance in R".
An excerpt from the paper reads "Under idealized assumptions, the expected 
amount of phenotypic change due to genetic drift is proportional to the amount 
of additive genetic variation in the ancestral population. Extending this model 
of neutral evolution to multiple traits leads to the expectation that the 
between-group covariance matrix for a set of related populations is 
proportional to the additive genetic covariance matrix of their common 
ancestral population (Lande, 1979). This rational has inspired statistical 
tests for natural selection by contrasting the covariance matrix of population 
means with the pooled phenotypic within-population covariance matrix (as an 
estimate of the ancestral genetic covariance matrix; e.g. Martin et al., 2008)".
Based on the above statement, am I right to say that the additive genetic 
variace-covariance matrix (commonly denoted as G) can be estimated as the 
pooled within-population covariance matrix (through the cov.W function)? 
Besides, am I right to say the phenotypic variance-covariance matrix  (commonly 
denoted as P) can be estimated as the between-group covariance matrix (through 
the cov.B function)?
Thank you again for your help.
Best regards,Patrick
On Tue, Jul 30, 2019 at 7:44 PM Anne Le Maitre <[email protected]> wrote:

Dear Patrik,

Thanks for your interest.

The difference between covW and cov.W was linked to the approach used in 
calculation of pooled within-group covariance matrix: in cov.W, the average of 
all the within-group covariance matrices was taken, whereas they are weighted 
by the sample size in covW. For the 'iris' data, the sample sizes are equal for 
all groups, so the weighting had no impact, which was not the case for the 
'Tropheus' data.
Attached is a new version of the function cov.W, which will be incorporated in 
the next version of the package vcvComp. I have added the argument 'weighted'. 
The default is set to 'FALSE'. When set to 'TRUE', the within-group covariance 
matrices are weighted by the sample sizes, as in covW. In this case, you get 
the same results using cov.W and covW for 'Tropheus' and 'iris' data.
If I understand well the description of the function cov.rob used in the 
internal code of covW, it computes a robust estimation of the covariance 
matrix, which is a way to minimize the effect of outliers on the covariance 
structure when the number of cases is above p + 1. Therefore, as long as there 
is no atypical point in the dataset, using cov or cov.rob should lead exactly 
to the same results. For now, the function cov.W only uses cov as internal 
function, so you should check the absence of outliers before using this 
function.

Best,

Anne



 

  Le samedi 27 juillet 2019 à 04:30:45 UTC+2, lv xiao <[email protected]> a 
écrit :  
 
 

Pretty clear explanation. Thank you.
Regarding the pooled-within group covariance matrix, I noted that both the 
cov.W function in vcvComp and the covW function in Morpho can be used.
With the iris data (used as the example of Morpho for covW), I get the same 
pooled-within group covariance matrix from both functions:> 
covW(iris[,1:4],iris[,5])             Sepal.Length Sepal.Width Petal.Length 
Petal.WidthSepal.Length   0.26500816  0.09272109   0.16751429  
0.03840136Sepal.Width    0.09272109  0.11538776   0.05524354  
0.03271020Petal.Length   0.16751429  0.05524354   0.18518776  
0.04266531Petal.Width    0.03840136  0.03271020   0.04266531  
0.04188163attr(,"means")           Sepal.Length Sepal.Width Petal.Length 
Petal.Widthsetosa            5.006       3.428        1.462       
0.246versicolor        5.936       2.770        4.260       1.326virginica      
   6.588       2.974        5.552       2.026> > cov.W(iris[,1:4],iris[,5])     
      [,1]       [,2]       [,3]       [,4][1,] 0.26500816 0.09272109 
0.16751429 0.03840136[2,] 0.09272109 0.11538776 0.05524354 0.03271020[3,] 
0.16751429 0.05524354 0.18518776 0.04266531[4,] 0.03840136 0.03271020 
0.04266531 0.04188163
However, with the data provided in vcvComp, different results were returned:
covW(pc.scores, groups = Tropheus.IK$POP.ID)              PC1           PC2     
      PC3           PC4           PC5PC1  1.334392e-04 -9.855269e-06 
-2.067332e-05  1.463312e-05  3.766745e-06PC2 -9.855269e-06  6.129627e-05 
-1.022908e-05 -1.119666e-06 -9.914084e-07PC3 -2.067332e-05 -1.022908e-05  
4.986701e-05  4.198867e-06 -3.080283e-07PC4  1.463312e-05 -1.119666e-06  
4.198867e-06  2.655314e-05  1.573463e-06PC5  3.766745e-06 -9.914084e-07 
-3.080283e-07  1.573463e-06  2.714387e-05attr(,"means")

cov.W(pc.scores, groups = Tropheus.IK$POP.ID)              [,1]          [,2]   
       [,3]          [,4]          [,5][1,]  1.214524e-04 -4.559118e-06 
-2.098212e-05  1.082849e-05  3.301874e-06[2,] -4.559118e-06  5.601458e-05 
-1.054149e-05 -2.371474e-08 -6.776709e-07[3,] -2.098212e-05 -1.054149e-05  
5.201804e-05  4.779061e-06 -9.245077e-07[4,]  1.082849e-05 -2.371474e-08  
4.779061e-06  2.477635e-05  1.956578e-06[5,]  3.301874e-06 -6.776709e-07 
-9.245077e-07  1.956578e-06  2.741012e-05
Results remain different whether I used "classical", "mve", or "mcd". I checked 
the source code of both functions and noted that covW made a decision as to 
whether to use cov.rob or cov for estimation of covariance matrix depending on 
whether group size is greater than 1+p (the number of traits) while cov.W used 
cov regardlessly. While this might lead to different results, it is strange 
then why for the iris data both functions returned the same results. Note that 
for iris data, each of the three groups had group size larger than 1+p, meaning 
cov.rob is used when using covW while cov is used when using cov.W. But why I 
got the same results now that one function used cov.rob under the hood and the 
other cov? In addition, why does the vcvComp chose to use a different approach 
from Morpho in calculation of pooled-within group covariance matrix?
Best regards,Patrick



On Friday, 26 July 2019 16:02:51 UTC+8, mitterp3 wrote:


ad 1) On biological grounds, you have to decide whether you want to study 
variances and covariances within each sex or within the entire population 
(i.e., pooling the sexes). The same applies to population means. If the sample 
is not balanced regarding sex, pooling the sexes will give the one with larger 
sample size a stronger impact on the result. E.g., having more females than 
males in a sample would lead to a population mean that is mostly affected by 
female specimens. One way to avoid this is to calculate female and male means 
(or variances) separately and then average these two sex means (or variances).
ad 2) Technically, the reason is that for one group the covariance matrix of 
all variables must be inverted, which requires a strong excess of cases over 
variables. This does not only apply to relPCA, but also to CVA, MANOVA, etc. In 
a regression, only the covariance matrix of the independent variables is 
inverted, not of the dependent variables. Hence no constraint on the dependent 
variables. 
There is no fixed threshold for PCs to include in further analyses such as 
relPCA. 
Best,
Philipp

Am Mittwoch, 17. Juli 2019 21:02:37 UTC+2 schrieb lxiao63:




Hi Dr. Mitteroecker,
Thank you for your contribution. I have two questions regarding the vcvComp 
package:
1. When is it necessary to specify the sex argument in the cov.group function? 
In your vignette 1, sex was sepcified because "population samples were not 
balanced regarding sex". Does this mean in cases where at least one of the 
groups under comparison has unequal sexes, the sex argument should be specified?






2. You mentioned in another post (https://groups.google.com/ 
forum/#!topic/morphmet2/ 28A1moJNmLk) that "No problem to use "redundant" or 
correlated variables as dependent variables in a multivariate regression", but 
why is it necessary to reduce dimensionality of the shape data before relative 
PCA? In addition, is there  a threshold for the proportion of total variance 
the reduced data should capture so that users could determine the number of PCs 
to retain?






Thanks. 
On Wednesday, 17 July 2019 02:32:57 UTC+8, mitterp3 wrote:
Dear morphometrics community,
I'd like to announce our new paper "Multivariate Comparison of Variance in R", 
in which we summarize and explain the methods for the analysis and comparison 
of multivariate variance-covariance patterns that we developed in the last 
years. We also provide functions in R. These methods are well suited for 
geometric morphometric data, but - as most multivariate methods - they all 
require prior variable reduction.
Hope this is helpful to some of you! 
Best,
Philipp Mitteroecker

Le Maître A, Mitteroecker P (in press) Multivariate Comparison of Variance in 
R. Methods in Ecology and Evolution  https://doi.org/10.1111/2041- 210X.13253
Mitteroecker P (2015) Affine invariant analysis of multivariate shape 
variation, with an example from human craniofacial growth. Proceedings of the 
The 33rd Leeds Annual Statistical Research Workshop. Mardia KV, Gusnanto A, 
Nooney C, Voss J (eds.), p. 145-149
Bookstein FL, Mitteroecker P (2014) Comparing Covariance Matrices by Relative 
Eigenanalysis, with Applications to Organismal Biology. Evolutionary Biology 
41, 336–350
Huttegger S, Mitteroecker P (2011) Invariance and Meaningfulness in Phenotype 
spaces. Evolutionary Biology 38, 335–352 

Mitteroecker P, Bookstein FL (2009) The Ontogenetic Trajectory of the 
Phenotypic Covariance Matrix, with Examples from Craniofacial Shape in Rats and 
Humans. Evolution 63 (3), 727-737










-- 


You received this message because you are subscribed to the Google Groups 
"Morphmet" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 

https://groups.google.com/d/msgid/morphmet2/a662521c-d8a9-4a6f-8526-6a8a7d510d1f%40googlegroups.com.
  
  


-- 
You received this message because you are subscribed to the Google Groups 
"Morphmet" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/morphmet2/b941b420-80bd-47b0-af87-88d28e9ebe39n%40googlegroups.com.
  

-- 
You received this message because you are subscribed to the Google Groups 
"Morphmet" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/morphmet2/881225507.3436690.1616496116905%40mail.yahoo.com.

Reply via email to