-------- Original Message --------
Subject: Re: MorphoJ regression scores in R II
Date: Mon, 5 Mar 2012 09:43:57 -0500
From: [email protected]
To: [email protected]
CC: morphmet <[email protected]>

Hi Chris,
Thankyou very much for your reply but ...
I'm using procrustes coordinates from Morphoj in my
simulation so..I assume my Y data (i.e. shapes data)
ARE centred. And as X data I use my log(Centroid
Size).
There are something that MorphoJ does that is not
clear to me for extracting scores?
Thankyou in advance
Best
Paolo




-------- Original Message --------
Subject: Re: MorphoJ regression scores in R
Date: Wed, 29 Feb 2012 06:46:13 -0500
From: Chris Klingenberg <[email protected]>
Reply-To: [email protected]
Organization: University of Manchester
To: [email protected]

Dear Paolo

The model as stated in the paper and your posting is
assuming centred
data. For shapes, this is normally so automatically
(tangent coordinates
usually have the origin at the mean shape). But for
the other variables,
this may not be the case. If you ensure that both the
x and y matrices
contain mean-centred variables, it should work.

Best wishes,
Chris


On 2/27/2012 5:24 PM, morphmet wrote:


-------- Original Message --------
Subject: MorphoJ regression scores in R
Date: Mon, 27 Feb 2012 11:55:57 -0500
From: [email protected]
To: [email protected]
CC: [email protected]



Dear all,
I'm trying to translate in R the procedure
implemented in MorphoJ when
performing a multivariate regression in order to
extraxct what MorphoJ
calls "regression scores" vector.
As described in Drake and Klingenberg (2008), and in
MorphoJ help, given
the regression equation *y* = *xB* + *e*, where *y*
is the random vector
of dependent variables (usually shape), *x* is the
random vector of
independent variables, *B* is the matrix of
regression coefficients, and
*e* is the random vector of error effects. A new
variable /s_i / can be
defined as /s_i / = *yb*/_i /^T (*b*/_i /^T *b*/_i
/)^-0.5 , where
*b*/_i / is the regression vector for the /i/-th
independent variable
(/x_i /) and shape. This is simply a projection of
the vector *y* onto
the direction of the regression vector *b*/_i /. In
the context of a
regession of a shape vector on one or more
independent variables, the
regression score /s_i / can be interpreted as the
shape variable that is
most strongly associated with the /i/-th independent
variable.


In R, given:

1) a lm() object
2) y: my dependent variables matrix

I defined:
mat.regcoef<-t(as.matrix(lm$coefficients[2,])) ## I
transpose now it
because it is in form of vector NOT of matrix

regscores<-(y%*%t(mat.regcoef))%*%(mat.regcoef%*%t(mat.regcoef))^-0.5

but ...when I compare these scores with those
extracted by MorphoJ I do
not found an exact identity. And I should do.......
Does anyone have an idea on how to fix the formula?

Thanks in advance
Paolo










--
***************************************************************
Christian Peter Klingenberg
Faculty of Life Sciences
The University of Manchester
Michael Smith Building
Oxford Road
Manchester M13 9PT
United Kingdom

Telephone: +44 161 275 3899
Fax: +44 161 275 5082
E-mail: [email protected]
Web: http://www.flywings.org.uk
Skype: chris_klingenberg
***************************************************************





--
Paolo Piras
Center for Evolutionary Ecology
             and
Dipartimento di Scienze Geologiche, Università Roma Tre
Largo San Leonardo Murialdo, 1, 00146 Roma
Tel: +390657338000
email: [email protected]


Reply via email to