RE: [MORPHMET] Re: semilandmarks in biology

2018-11-07 Thread Adams, Dean [EEOBS]
Folks,
 
I think it is important to recognize that the example in Andrea’s earlier post 
does not really address the validity of sliding semilandmark methods, because 
all of the data were simulated using isotropic error. Thus, the points called 
semilandmarks in that example were actually independent of one another at the 
outset.
 
Yet a major reason for using semilandmark approaches is the fact that points 
along curves and surfaces covary precisely because they are describing those 
structures. Thus, this interdependence must be accounted for before shapes are 
compared between objects. The original literature on semilandmark methods makes 
this, and related issues quite clear.
 
What that means is that evaluating semilandmark methods requires simulations 
where the points on curves are simulated with known input covariance based on 
the curve itself (difficult, but not impossible to do). But using independent 
error will not accomplish this.
 
The result is that treating fixed landmarks as semilandmarks can lead to what 
some feel are unintended outcomes, just as treating semilandmarks as fixed 
points are known to do (illustrated nicely in Figs 1-4 of Gunz et al. 2005). 
But both are mis-applications of methods, not indictments of them. 

As to the other points in the thread (the number of semilandmark points, etc.), 
earlier posts by Jim, Philipp, and Mike have addressed these.
 
Dean

Dr. Dean C. Adams
Director of Graduate Education, EEB Program
Professor
Department of Ecology, Evolution, and Organismal Biology
Iowa State University
www.public.iastate.edu/~dcadams/
phone: 515-294-3834

-Original Message-
From: andrea cardini  
Sent: Wednesday, November 7, 2018 4:31 AM
To: morphmet@morphometrics.org
Subject: Re: [MORPHMET] Re: semilandmarks in biology

Making cool pictures has a purpose only if both the pics and the numbers behind 
them are accurate. It's not an aim in itself, I hope (although this is the 
second time I hear that one should add as many points as needed to see a nice 
picture). Parsimonious explanations are, to me, much more appealing than nice 
pictures (as much as I like a beautiful visualization), but that might be a 
matter of taste.

Philipp, could you clarify what "homology function" means?
We're not saying that sliding creates homology, as I sometimes read in papers, 
are we?

No doubt one does not expect anatomical regions of an organism to be 
independent. The open question to me is what the biological covariance is and 
what is the bit added by superimposing and maybe sliding. I suspect that on 
this there's no universal answer: it will be dependent on the study organism, 
the number and distribution (and type) of landmarks etc. In some studies it 
might not matter much, but in others may be much more relevant.

Thanks all for the comments.
Cheers

Andrea

On 06/11/2018 20:53, mitte...@univie.ac.at wrote:
> Yes, it was always well known that sliding adds covariance but this is 
> irrelevant for most studies, especially for group mean comparisons and 
> shape regressions: the kind of studies for which GMM is most 
> efficient, as Jim noted.
> If you consider the change of variance-covariance structure due to (a 
> small amount of) sliding as an approximately linear transformation, 
> then the sliding is also largely irrelevant for CVA, relative PCA, 
> Mahalanobis distance and the resulting group classifications, as they 
> are all based on the relative eigenvalues of two covariance matrices 
> and thus unaffected by linear transformations. In other words, in the 
> lack of a reasonable biological null model, the interpretation of a 
> single covariance structure is very difficult, but the way in which 
> one covariance structure deviates from another can be interpreted much easier.
> 
> Concerning your example: The point is that there is no useful model of 
> "totally random data" (but see Bookstein 2015 Evol Biol). Complete 
> statistical independence of shape coordinates is geometrically 
> impossible and biologically absurd. Under which biological (null) 
> model can two parts of a body, especially two traits on a single 
> skeletal element such as the cranium, be complete uncorrelated?
> 
> Clearly, semilandmarks are not always necessary, but making "cool 
> pictures" can be quite important in its own right for making good 
> biology, especially in exploratory settings. Isn't the visualization 
> one of the primary strengths of geometric morphometrics?
> 
> It is perhaps also worth noting that one can avoid a good deal of the 
> additional covariance resulting from sliding. Sliding via minimizing 
> bending energy introduces covariance in the position of the 
> semilandmarks _along_ the curve/surface. In some of his analyses, Fred 
> Bookstein just included the coordinate perpendicular to the 
> curve/surface for the semilandmarks, thus discarding a large part of 
> the covariance. Note also that sliding via minimizing Procrustes 
> distance introduces only 

RE: [MORPHMET] Re: Conceptual clarification of plotting shape deformation grids in geomorph

2018-11-07 Thread Adams, Dean [EEOBS]
Igor,

The components, $means contain the least squares means from the linear model 
implemented in trajectory analysis. These can be visualized relative to some 
reference (e.g., the overall mean shape), using ‘plotRefToTarget’.  Note that 
the $means must first be converted to a 2D array using ‘arrayspecs.’

An example is below (see also relevant help files).

Best,

Dean

##
data(plethodon)
Y.gpa <- gpagen(plethodon$land)
gdf <- geomorph.data.frame(Y.gpa, species = plethodon$species, site = 
plethodon$site)
TA <- trajectory.analysis(coords ~ species*site, data=gdf, iter=199)

new <- arrayspecs(TA$means,p=12,k=2)
ref <-mshape(Y.gpa$coords)
plotRefToTarget(ref,new[,,1])
##

Dr. Dean C. Adams
Director of Graduate Education, EEB Program
Professor
Department of Ecology, Evolution, and Organismal Biology
Iowa State University
www.public.iastate.edu/~dcadams/
phone: 515-294-3834

From: Igor Talijančić 
Sent: Monday, November 5, 2018 4:26 AM
To: MORPHMET 
Cc: mlcoll...@gmail.com
Subject: [MORPHMET] Re: Conceptual clarification of plotting shape deformation 
grids in geomorph


Hello everyone,

Just a question regarding the plotting of deformation grinds of the trajectory 
analysis (e.g. pupfish or plethodon data). Can shape.predictor function be used 
for visualizing TA$pc.means since TA$pc.data corresponds to PC scores obtained 
for Y.gpa$coords?



Thank you for your given time and consideration.



Sincerely,

Igor

Dana srijeda, 25. srpnja 2018. u 14:42:41 UTC+2, korisnik javiersantos3 napisao 
je:

Hello Carmelo and Mike,



Thanks for the quick response! I see things now clearer, especially with the 
examples you have both provided. Sometimes one gets disoriented in the 
abstractness of shape space and coding ;-P  Thanks again!





Best wishes,

Javier






From: Mike Collyer >
Sent: Wednesday, July 25, 2018 2:29:38 PM
To: Javier Santos
Cc: Morphomet Mailing List
Subject: Re: Conceptual clarification of plotting shape deformation grids in 
geomorph

Javier,

First your plotting question.  The plot.trajectory.analysis function is an S3 
generic plot function, which means you can modify the plot as you like.  You do 
this easiest with the points function.  Here is an example, using the help page 
example, which hopefully makes sense for you:


data(plethodon)

Y.gpa <- gpagen(plethodon$land)

gdf <- geomorph.data.frame(Y.gpa, species = plethodon$species, site = 
plethodon$site)



TA <- trajectory.analysis(coords ~ species*site, data=gdf)

summary(TA, angle.type = "deg")

plot(TA)

# Augment plot with the following code

points(TA$pc.data, pch=19, col = "blue”) # turn all points blue

points(TA$pc.data, pch=19, col = TA$groups) # change points to different 
colors, by group
One can modify plots as desired but you might need to learn how to use 
graphical parameters in order to do it.  See the help for the function, par, to 
know how to do that.

Second, since PC scores are Procrustes residuals (coordinates) projected onto 
PC axes, there is a direct correspondence between an observation’s set of 
coordinates and its PC scores.  If you perform trajectory analysis, the $means 
object has the coordinates for the means (trajectory points).  You simply have 
to rearrange the values with arrayspecs to generate deformation grids.  The 
$pc.data is a matrix of PC scores whose rows correspond to the coordinates in 
the gpagen object.  For example, TA$pc.data[5,] is a set of PC scores for 
Y.gpa$coords[,,5].

Finally, for your last question, the function shape.predictor does exactly what 
you seek.  The help page has examples that should help you (on e specifically 
for allometry).

Cheers!
Mike

On Jul 25, 2018, at 7:17 AM, Javier Santos > 
wrote:

Hello Morphometricians,

I was hoping someone could clarify the concept of plotting shape deformation 
grids from the geomorph output. I am confused at the moment because the output 
of most functions (eg. trajectory.analysis()) gives PC values or regression 
scores, while most of the plotting functions I know (eg. plotRefToTarget(), 
plotTangentSpace(), plotAllSpecimens()) require LM coordinates. I am sure that 
the conceptual framework to plot the shape deformation grids corresponding from 
the PC/regression values of the functions' output should not be too 
complicated, but I am currently lost how to do so with the coding and do not 
have a working example.

I will use my current analysis as an example from which to work upon. I have 
ran a trajectory.analysis() on a three species sample:

ontogeny <- trajectory.analysis(M2d ~ 
species*age,f2=NULL,iter=999,seed=NULL,data=gdf)

and plot the results:

x11(); 
plot(ontogeny,group.cols=c("red","blue","green"),pt.scale=1.5,pt.seq.pattern=c("black","gray","white"))

The following code plots the trajectory in the corresponding PC1-PC2 
morphospace with each species' trajectory in a different color, however, 
although the lines are different colors, 

Re: [MORPHMET] Re: semilandmarks in biology

2018-11-07 Thread andrea cardini
Making cool pictures has a purpose only if both the pics and the numbers 
behind them are accurate. It's not an aim in itself, I hope (although 
this is the second time I hear that one should add as many points as 
needed to see a nice picture). Parsimonious explanations are, to me, 
much more appealing than nice pictures (as much as I like a beautiful 
visualization), but that might be a matter of taste.


Philipp, could you clarify what "homology function" means?
We're not saying that sliding creates homology, as I sometimes read in 
papers, are we?


No doubt one does not expect anatomical regions of an organism to be 
independent. The open question to me is what the biological covariance 
is and what is the bit added by superimposing and maybe sliding. I 
suspect that on this there's no universal answer: it will be dependent 
on the study organism, the number and distribution (and type) of 
landmarks etc. In some studies it might not matter much, but in others 
may be much more relevant.


Thanks all for the comments.
Cheers

Andrea

On 06/11/2018 20:53, mitte...@univie.ac.at wrote:
Yes, it was always well known that sliding adds covariance but this is 
irrelevant for most studies, especially for group mean comparisons and 
shape regressions: the kind of studies for which GMM is most efficient, 
as Jim noted.
If you consider the change of variance-covariance structure due to (a 
small amount of) sliding as an approximately linear transformation, then 
the sliding is also largely irrelevant for CVA, relative PCA, 
Mahalanobis distance and the resulting group classifications, as they 
are all based on the relative eigenvalues of two covariance matrices and 
thus unaffected by linear transformations. In other words, in the lack 
of a reasonable biological null model, the interpretation of a single 
covariance structure is very difficult, but the way in which one 
covariance structure deviates from another can be interpreted much easier.


Concerning your example: The point is that there is no useful model of 
"totally random data" (but see Bookstein 2015 Evol Biol). Complete 
statistical independence of shape coordinates is geometrically 
impossible and biologically absurd. Under which biological (null) model 
can two parts of a body, especially two traits on a single skeletal 
element such as the cranium, be complete uncorrelated?


Clearly, semilandmarks are not always necessary, but making "cool 
pictures" can be quite important in its own right for making good 
biology, especially in exploratory settings. Isn't the visualization one 
of the primary strengths of geometric morphometrics?


It is perhaps also worth noting that one can avoid a good deal of the 
additional covariance resulting from sliding. Sliding via minimizing 
bending energy introduces covariance in the position of the 
semilandmarks _along_ the curve/surface. In some of his analyses, Fred 
Bookstein just included the coordinate perpendicular to the 
curve/surface for the semilandmarks, thus discarding a large part of the 
covariance. Note also that sliding via minimizing Procrustes distance 
introduces only little covariance among semilandmarks because Procrustes 
distance is minimized independently for each semilandmark (but the 
homology function implied here is biologically not so appealing).


Best,

Philipp



Am Dienstag, 6. November 2018 18:34:51 UTC+1 schrieb alcardini:

Yes, but doesn't that also add more covariance that wasn't there in
the first place?
Neither least squares nor minimum bending energy, that we minimize for
sliding, are biological models: they will reduce variance but will do
it in ways that are totally biologically arbitrary.

In the examples I showed sliding led to the appearance of patterns
from totally random data and that effect was much stronger than
without sliding.
I neither advocate sliding or not sliding. Semilandmarks are different
from landmarks and more is not necessarily better. There are
definitely some applications where I find them very useful but many
more where they seem to be there just to make cool pictures.

As Mike said, we've already had this discussion. Besides different
views on what to measure and why, at that time I hadn't appreciated
the problem with p/n and the potential strength of the patterns
introduced by the covariance created by the superimposition (plus
sliding!).

Cheers

Andrea

On 06/11/2018, F. James Rohlf > wrote:
 > I agree with Philipp but I would like to add that the way I think
about the
 > justification for the sliding of semilandmarks is that if one
were smart
 > enough to know exactly where the most meaningful locations are
along some
 > curve then one should just place the points along the curve and
 > computationally treat them as fixed landmarks. However, if their
exact
 > positions are to some extend arbitrary (usually the case)