Re: [MORPHMET] Script to read Avizo landmarks and B-splines

2019-04-15 Thread Miguel Eduardo Delgado Burbano
Dear Antonio,

Thank you very much for your functions. All of them work very well. I
realized that a simple modification of the function read.landmarks from the
nat package allows load into the R console Avizo Landmarks in ascii format
but not semilandmark curves. Again thanks for your kind help.

All best,

Miguel


El lun., 15 de abr. de 2019 5:46 p. m., Antonio Profico <
antonio.prof...@uniroma1.it> escribió:

> Hi Miguel,
>
> thanks for sending me the example files. You can use the existing
> functions embedded in Arothron:
>
> library(Arothron)
> land.set<-"landmarksfromAvizo"
> set<-read.amira.set(land.set,"auto") #this is an array
> bspline<-"bsplinefromAvizo"
> set_2<-read.amira.set(bspline,"auto") #this is an array
> LineSet<-"linesetfromAvizo"
> curve_temp<-read.path.amira(LineSet) #this is a data.frame
> curve<-as.matrix(curve_temp)
>
> library(Morpho)
> #sample evenly spaced points (10 in this case) along "curve"
> ev.sp.points<-equidistantCurve(curve,10)
>
> Best,
>
> Antonio
>
> Il giorno lun 15 apr 2019 alle ore 01:35 Antonio Profico <
> antonio.prof...@uniroma1.it> ha scritto:
>
>> Hi Miguel,
>>
>> please send me the two files from Avizo (.ladmarkAscii) and B-splines
>> (.am).
>> Are you sure that read.amira.set() doesn't work with the .landmarkAscii
>> files from Avizo?
>>
>> I'll add these two functions in Arothron and before to submit the new
>> release to the CRAN I'll send them to you.
>>
>> Best,
>>
>> Antonio
>>
>> Il giorno lun 15 apr 2019 alle ore 01:26 Miguel Eduardo Delgado Burbano <
>> mdelgadoburb...@gmail.com> ha scritto:
>>
>>> Dear All,
>>>
>>> I'm using landmarks (.ladmarkAscii) and B-splines (.am) derived from
>>> Avizo (Standard Edition 7.1.0). I have used previously the Arothron and Nat
>>> packages to load landmarks derived from Amira into the R console. Now
>>> using the Avizo files such packages do not seem to work. Somebody has a
>>> script to read Avizo files in R or know a way to succesfully load such
>>> files into the R console? Thanks for any suggestion
>>>
>>> All best,
>>>
>>> Miguel
>>>
>>> --
>>> MORPHMET may be accessed via its webpage at http://www.morphometrics.org
>>> ---
>>> 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 morphmet+unsubscr...@morphometrics.org.
>>>
>>
>>
>> --
>> __
>>
>> Antonio Profico
>> PhD
>> Department of Environmental Biology – Dipartimento di Biologia Ambientale
>> SAPIENZA Università di Roma
>>
>> MicroWeaR mailing list: https://groups.google.com/forum/#!forum/microwear
>> Subscription: https://groups.google.com/forum/#!forum/microwear/join
>>
>> Arothron mailing list: https://groups.google.com/forum/#!forum/arothron
>> 
>> Subscription: https://groups.google.com/forum/#!forum/arothron/join
>>
>> Lab.  06 4991 2690
>> Mob. 3293440766
>>
>
>
> --
> __
>
> Antonio Profico
> PhD
> Department of Environmental Biology – Dipartimento di Biologia Ambientale
> SAPIENZA Università di Roma
>
> MicroWeaR mailing list: https://groups.google.com/forum/#!forum/microwear
> Subscription: https://groups.google.com/forum/#!forum/microwear/join
>
> Arothron mailing list: https://groups.google.com/forum/#!forum/arothron
> 
> Subscription: https://groups.google.com/forum/#!forum/arothron/join
>
> Lab.  06 4991 2690
> Mob. 3293440766
>

-- 
MORPHMET may be accessed via its webpage at http://www.morphometrics.org
--- 
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 morphmet+unsubscr...@morphometrics.org.


Re: [MORPHMET] A question about geometric morphometrics

2019-04-15 Thread Joseph Kunkel
With reference to the Yang Chang skull group query:

I am a devotee of Analysis of Dispersion combined with Factorial Design of CR 
Rao (1965).

The model is  Y = XB

Y is a n by 3k+c matrix of n rows of k xyz coordinates plus c covariates such 
as size and weight covariates.

X is a n by p design matrix of assignment multipliers to chose the B matrix 
factor values. 

-the elements of X are usually 1s, 0s and -1s.

B is a matrix of p by 3k+c factors which are tested for their significance as 
factors.

As usual the solution is B = (X’X)^-1(X’Y).

3k columns of Y are the matrix of landmarks rotated and resized by the usual 
landmark alignment process. And one of the c columns of the Y matrix is the 
resizing size value produced in the alignment.

I use the Analysis of Dispersion (Rao 1965) to test the significance and obtain 
the crossproducts matrices that reduces the total sums of squares and 
crossproducts matrix Y’Y for the mean and independent factors, in your case the 
groups of skulls.

The residual covariance matrix is used to test for the significance of the 
factors which at this point are not corrected for the covariance with size (for 
instance).

Next, within Rao's Analysis of Dispersion one tests the factor crossproducts 
matrices of the Y columns for whether there is any additional information in 
one or more of the covariates (such as the size column).  If there is no 
additional info in the size covariate one can ignore it.  If one or more 
covariates is significant one can change the Equation to be:

Y’ = ZB = [Yc | Yd | X]B

Y' is the Y matrix with the covariate columns removed.

Yc and Yd are the significant covariate columns appended to the design matrix X 
to create Z extended design.

That system of matrix equations is solved the same way as previously but since 
c and d covariates are likely not independent of the factor design columns 
their sums of squares and crossproducts reduction are calculated by subtraction 
rather than being independently calculable.

This is all quite simple if one is familiar with factorial design, just 
generalized to a n by 3k Y matrix of observations.

It is explained in matrix algebra by Rao (1965).

I have implemented it in R if you have the patience of following the rules of 
design matrices and choosing factors to be tested independently or by 
subtraction.

I am not sure Jim would approve of this specific approach but I am convinced 
that it is correct and gives you a test of significance as well as a way of 
calculating the expected Y', Yhat.

Yhat = ZB

Which provides with the factors which allows computation of average differences 
between factor groups and with chosen c and d covariate effects.

CR Rao (1965) Linear Statistical Inference and Its Applications.John Wiley & 
Sons, New York, 522pp.
I have recently upgraded my R scripts to be consistent with recent versions of 
R. The two relevant R-scripts are Andy.R and ad info.R

http://www.bio.umass.edu/biology/kunkel/pub/r_scripts/andy/ 


The sample inputs found there are csv matrices that a simple YX matrices of 
appended Y and design matrix X.

If you need help with their use I am available by Email.

Joe
-·.  .· ·.  .><º>·.  .· ·.  .><º>·.  .· ·.  .><º> .··.· >=-   
=º}><
Joseph G. Kunkel, Research Professor
122C/125 Pickus Center for Biomedical Research
Marine Science
University of New England
Biddeford ME 04005
http://www.bio.umass.edu/biology/kunkel/ 



> On Apr 11, 2019, at 5:31 AM, yang Chang  wrote:
> 
> I want to compare skull morphology using geometric morphometrics from several 
> species with different diets in a same genus. But I don't know much about how 
> to analyze these shape data. What statistical analysis can I do? I know that 
> principal component analysis can be done to visualize shape variations. So 
> can I use the original coordinate data? Do I need to remove the effects of 
> size and phylogenetic relationships to do principal component analysis? If 
> so, do I use PGLS to do the regression of shape and size, and then use the 
> obtained residual as the principal component analysis? In addition to this 
> analysis, what other aspects can I do? Looking forward to reply.Thanks very 
> much!
> 
> -- 
> MORPHMET may be accessed via its webpage at http://www.morphometrics.org
> --- 
> 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 morphmet+unsubscr...@morphometrics.org.

-- 
MORPHMET may be accessed via its webpage at http://www.morphometrics.org
--- 
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 morphmet+unsubscr...@morphometrics.org.


[MORPHMET] A question about geometric morphometrics

2019-04-15 Thread yang Chang
I want to compare skull morphology using geometric morphometrics from several 
species with different diets in a same genus. But I don't know much about how 
to analyze these shape data. What statistical analysis can I do? I know that 
principal component analysis can be done to visualize shape variations. So can 
I use the original coordinate data? Do I need to remove the effects of size and 
phylogenetic relationships to do principal component analysis? If so, do I use 
PGLS to do the regression of shape and size, and then use the obtained residual 
as the principal component analysis? In addition to this analysis, what other 
aspects can I do? Looking forward to reply.Thanks very much!

-- 
MORPHMET may be accessed via its webpage at http://www.morphometrics.org
--- 
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 morphmet+unsubscr...@morphometrics.org.