morphmet
Sat, 03 Oct 2009 07:59:52 -0700
-------- Original Message -------- Subject: Re: Algorithm and visualisation of CVA Date: Sat, 3 Oct 2009 04:56:52 -0700 (PDT) From: oyvind.ham...@nhm.uio.no To: morphmet@morphometrics.org References: <4ac5ff5e.1020...@morphometrics.org> Dear Stefan, I would be very grateful if you could email me your R code for CVA. I can compute W, B etc. myself, but what is then your procedure for reproducing the MorphoJ CVA ? Through the years I have used several versions of CVA taken from the literature for my program "Past", but I never managed to reproduce exactly the result of any other software package! Thanks again, Oyvind Hammer Natural History Museum University of Oslo
-------- Original Message -------- Subject: Re: Algorithm and visualisation of CVA Date: Fri, 2 Oct 2009 06:07:53 -0700 (PDT) From: Stefan Schlager <stefan.schla...@uniklinik-freiburg.de> To: morphmet@morphometrics.org References: <4ac38d6e.7040...@morphometrics.org> Dear all, I solved the problem: I forgot the weighting of the Between groups SSQ matrix (and some corrections related to the degrees of freedom involved). I am now able to reproduce the exact same results as MorphoJ (calculation and visualization) Anyhow, I would be glad, if anyone could explain to me (or tell me, where I can read it), if my explanation for *W%*%CV *as invertation of the scaling was true. I actually just tried it, as the adding of an untransformed CV to the mean bore rather grotesque results. And it seemed logical that there was still some kind of space deformation "inherent" in the CV. Another question is, where to put the threshold for a zero eigenvalue of W, as the inverse inflates minimal differences (for example if superimposition is done by different software programs): The canonical roots differ significantly, if the threshold is too low. At the moment I put it to 1e-7 and gained about the same results, no matter how superimposition is performed - is there any reliable value I should chose ore rather let "the thumb rule"? I would also be thankfull for further detailed literature (my main input upt to now was: /Zelditch, 2004, Campbell, N. A. and Atchley, W. R. (1981). The geometry of Canonical Variates analysis. Systematic Zoology, 30, 268?280 and Klingenberg (2005), Distances and directions in multidimensional shape spaces: implications for morphometric applications)/ Greetings and a nice weekend Stefan ** Stefan Schlager M.A. Medizinische Fakultät - Anthropologie Hebelstr. 29 79104 Freiburg Tel: +49(0)761/203-5522 Fax: +49(0)761/203-6898 morphmet schrieb:-------- Original Message -------- Subject: Algorithm and visualisation of CVA Date: Wed, 30 Sep 2009 07:15:53 -0700 (PDT) From: Stefan Schlager <stefan.schla...@uniklinik-freiburg.de> To: morphmet@morphometrics.org References: <4ac347c7.8080...@morphometrics.org> Dear all, I'm trying to write a script in R for performing a CVA and a couple of questions came up. * let W be the pooled within groups covariance matrix * and B the between groups covariance matrix * A is a matrix of shape variables * ng is the number of groups * n is the number of observations 1. as far as I understand, the CVs are: CV<-eigen(ginv(W)%*%B)$vectors[,1:ng] ---- ginv=general inverse the CVscores then are: A%*%CV when performing a CVA with two groups, I get the exact same results as in MorphoJ - only on a far smaller scale. When I have more than two groups, the CVs are completely different - wheras the plot of the scores are very similar to those of MorphoJ 2. How can I calculate the effects on actual configurations for visualization? I thought of something like: meanshape+x*(W%*%CV[,i]) ----- for the i-th CV for the two-group example I got the same results as MorphoJ (after scaling W by factor n) where W inverts the deformation of the adjusted space and x is the CVscore to be displayed. My questions now: do I miss something in point 1. when it comes to more than two groups? is the calculation of the effect of the CV correct? Thank you very much in advance Stefan Stefan Schlager M.A. Medizinische Fakultät - Anthropologie Hebelstr. 29 79104 Freiburg Tel: +49(0)761/203-5522 Fax: +49(0)761/203-6898-- Replies will be sent to the list. For more information visit http://www.morphometrics.org
-- Replies will be sent to the list. For more information visit http://www.morphometrics.org