Hi folks,
given that I received many requests for R functions associated to
Varano, V., Gabriele, S., Teresi, L., Dryden, I., Puddu, P., Torromeo, C.,
& Piras, P. 2015. Comparing shape trajectories of biological soft tissues
in the size-and-shape space. In Biomat 2014: International Symposium on
Mathematical and Computational Biology (pp. 351-365), I decided to share
them here with some fully working examples.
I invite those to which I already sent the functions to re-download this
updated material.
I then attach R functions (including ancyllaries), the main function help,
a workspace and the R script for running the examples. These examples are
very easy and more complex designs could be set.
As wrote at the begin of the R script, I stress that, in order to recover
perfectly deformations, there is the need to go beyond Levi Civita
connection. I hope to update you soon on this issue.
Best
paolo

-- 
MORPHMET may be accessed via its webpage at http://www.morphometrics.org

To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
The arguments of the pt2dvar() function are :


array =     an input array of n shapes represented by k landmarks in 
2-dimensions, i.e. k x 2 x n; these are the input data subjected to the entire 
procedure; If you want to use this for studying allometry your input data 
should be predictions coming from separate regressions between size+shape and 
size or shape and size. This because estimating hierarchically the deformations 
within each group relatively to a local reference assumes that a reasonably 
"clean deformational direction" exists. Using real data there is too much 
noise. It is also *mandatory* that these shapes are ordered, within each group, 
according to the direction of deformation. For example, in the case of 
allometry, when using predictions, be sure that these predictions are ordered 
by group and, within each group, by size at which predictions were calculated. 
The best should be to do such ordination before running regression and 
claculating predictions to be inputted here. Scale them at unit size if the 
analysis in the shape space is desired.

group =     a factor corresponding to group affiliation of each shape in the 
array
doopa= F   leave this default
tol=0.000001     the value to manage possible reflections in deformation vector 
differences; leave it as is if you do not have reflections in the output. 

CR=NULL   a kx2 matrix; this is the shape towards which you transport 
deformations hierarchically estimated within each group; if NULL the GRAND mean 
of the entire sample is used. In case of allometry-oriented investigations CR 
should be the consensus of smallest per-group predictions. Scale it at unit 
size if the analysis in the shape space is desired.

locs=NULL  an array k x 2 x n追evels(group) these are the local references, one 
for each group, relatively to which you will estimate the within-group 
deformations. If NULL per-group means are used. In case of allometry-oriented 
investigations locs should be smallest (in terms of size at which predictions 
were calculated) per-group predictions. Scale them at unit size if the analysis 
in the shape space is desired.

sss=T  Data are assumed to be analyzed in the Size and Shape Space. The Shape 
Space is now implemented (sss=F). In this case array, CR and locs should be 
scaled at unit size. Rotation is not mandatory in input as all objects are 
properly aligned internally at the various steps.

OUTPUT is a list that includes:

final=the data that have been transported.

epsilons= error relative to an euclidean approximattion in the size and shape 
space
epsilons2= error relative to an euclidean approximattion in the shape space

THESE RESULTS ARE ROTATION DIAGNOSTICS FOR INNER STEPS useful TO DETECT 
POSSIBLE REFLECTIONS. HOPEFULLY YOU SHOULD IGNORE THEM
trasprotsmua= vectors deriving from the Parallel Transport. For diagnostics 
only.
trasprotsva= rotations deriving from the Parallel Transport. For diagnostics 
only.
locsop= locs rotated on CR via OPA
locsrot= rotation matrices corresponding to locsop
specop= input specimens rotated on their proper loc via OPA
specrots= rotation matrices corresponding to specop



Attachment: R script with examples.R
Description: Binary data

Attachment: Data example for running pt2dvar.RData
Description: Binary data

Attachment: pt2dvar and necessary ancillaries.r
Description: Binary data

Reply via email to