The functions readland.tps and readland.nts may be used to import shape data if they are in the appropriate file formats.
Dean
Dr. Dean C. Adams
Professor
Department of Ecology, Evolution, and Organismal Biology
Department of Statistics
Iowa State University
www.public.iastate.edu/~dcadams/
phone: 515-294-3834
--
You received this message because you are subscribed to the Google Groups "geomorph R package" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
geomorph-r-pack...@googlegroups.com.
To post to this group, send email to
geomorph-...@googlegroups.com.
Visit this group at
https://groups.google.com/group/geomorph-r-package.
To view this discussion on the web, visit
https://groups.google.com/d/msgid/geomorph-r-package/12c0608c-2977-4ae4-b78a-5139b1735484%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
The script you sent is overly complicated for what you wish to do. It looks a bit like one is trying to force a MorphoJ structure on your data. That is not necessary. The basic steps are these:
1: read in your data, both the landmarks and the other variables. In your case, you have read in the shape data ‘mydata’. This is a 3D array of whatever was in your TPS file. Then you have a second object ‘classifier’ that contains your additional variables: population and sex.
2: do GPA if you have not already (use gpagen in geomorph). It seems you have done this outside of geomorph. Be aware that some other software uses full Procrustes rather than the more appropriate partial Procrustes. So you may wish to bring the original landmark dataset into geomorph. This will also allow you to obtain centroid size for other analyses, as Csize is obtained from gpagen.
3: do Procrustes anova. For your example, you do this last step as:
myresults<-procD.lm(mydata~classifier$Population*classifier$Sex)
summary(myresults)
Here, you have done a factorial model with interaction. The output is found myresults.
The help file for procD.lm has additional comments, hints, and examples.
Best,
Dean
Dr. Dean C. Adams
Professor
Department of Ecology, Evolution, and Organismal Biology
Department of Statistics
Iowa State University
www.public.iastate.edu/~dcadams/
phone: 515-294-3834
From: geomorph-...@googlegroups.com [mailto:geomorph-...@googlegroups.com] On Behalf Of Milena Stefanovic
Sent: Wednesday, October 19, 2016 3:30 AM
To: geomorph R package <geomorph-...@googlegroups.com>
--
You received this message because you are subscribed to the Google Groups "geomorph R package" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
geomorph-r-pack...@googlegroups.com.
To post to this group, send email to
geomorph-...@googlegroups.com.
Visit this group at
https://groups.google.com/group/geomorph-r-package.
To view this discussion on the web, visit https://groups.google.com/d/msgid/geomorph-r-package/d43c0edd-d8c0-44cb-8e6c-0e5e6aa33dad%40googlegroups.com.
Dr. Adams,
Thank you very much for your help.
I have done superimposition in tpsRelw, but to be honest I am not sure if that was full or partial Procrustes. In help menu of the programme it is not specified , only reference to: Rohlf and Slice, 1990 (Extensions of the Procrustes method for the optimal superimposition of landmarks. Systematic Zool., 39:40-59).
I also did superimposition in geomorph, as you seggested:
Taxus_all <- readland.tps("Output file_Taxus baccata_digitized.tps", specID = "ID", readcurves=TRUE)
dim(Taxus_all)
Y.gpa2 <- gpagen(Taxus_all, curves = define.sliders(Taxus_all[,,1], 26), ProcD = FALSE)
and PCA:
plotTangentSpace(Y.gpa2$coords)
First two principal components explain 86.05% of shape variation and it seems that there are some groupings of data, but deformation grids seems little bit strange to me. What could be the cause of that (PCA plot is attached)?
Best regards,
Milena
--
You received this message because you are subscribed to the Google Groups "geomorph R package" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geomorph-r-pack...@googlegroups.com.
To post to this group, send email to geomorph-...@googlegroups.com.
Visit this group at https://groups.google.com/group/geomorph-r-package.
To view this discussion on the web, visit https://groups.google.com/d/msgid/geomorph-r-package/b780e3b1-3145-4c86-931e-8718ac35aca5%40googlegroups.com.
<Rplot_PCA.pdf>
Dean
Dr. Dean C. Adams
Professor
Department of Ecology, Evolution, and Organismal Biology
Department of Statistics
Iowa State University
www.public.iastate.edu/~dcadams/
phone: 515-294-3834
To view this discussion on the web, visit https://groups.google.com/d/msgid/geomorph-r-package/0B11CAB1-099E-4E38-BD5B-BA20F4F618EA%40gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to geomorph-r-package+unsub...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to geomorph-r-pack...@googlegroups.com.
To post to this group, send email to geomorph-...@googlegroups.com.
Visit this group at https://groups.google.com/group/geomorph-r-package.
To view this discussion on the web, visit https://groups.google.com/d/msgid/geomorph-r-package/5295089a-5a5c-4a15-a500-948fb27ef306%40googlegroups.com.
<Rplot_after superimposition.pdf><All populations_consensus.jpg>
Dean
Dr. Dean C. Adams
Professor
Department of Ecology, Evolution, and Organismal Biology
Department of Statistics
Iowa State University
www.public.iastate.edu/~dcadams/
phone: 515-294-3834
From: geomorph-...@googlegroups.com [mailto:geomorph-...@googlegroups.com]
On Behalf Of Mike Collyer
Sent: Friday, October 21, 2016 10:43 AM
To: Milena Stefanovic <milen...@gmail.com>
Cc: geomorph R package <geomorph-...@googlegroups.com>
Subject: Re: [geomorph-r-package] Importing superimposed data in geomorph
Milena,
To unsubscribe from this group and stop receiving emails from it, send an email to geomorph-r-pack...@googlegroups.com.
To post to this group, send email to geomorph-...@googlegroups.com.
Visit this group at https://groups.google.com/group/geomorph-r-package.
To view this discussion on the web, visit https://groups.google.com/d/msgid/geomorph-r-package/b780e3b1-3145-4c86-931e-8718ac35aca5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<Rplot_PCA.pdf>
--
You received this message because you are subscribed to the Google Groups "geomorph R package" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geomorph-r-pack...@googlegroups.com.
To post to this group, send email to geomorph-...@googlegroups.com.
Visit this group at https://groups.google.com/group/geomorph-r-package.
To view this discussion on the web, visit https://groups.google.com/d/msgid/geomorph-r-package/5295089a-5a5c-4a15-a500-948fb27ef306%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<Rplot_after superimposition.pdf><All populations_consensus.jpg>
--
You received this message because you are subscribed to the Google Groups "geomorph R package" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
geomorph-r-pack...@googlegroups.com.
To post to this group, send email to
geomorph-...@googlegroups.com.
Visit this group at
https://groups.google.com/group/geomorph-r-package.
To view this discussion on the web, visit https://groups.google.com/d/msgid/geomorph-r-package/7AB2F50E-1E32-46AD-9291-E095BBC6E158%40gmail.com.
I do not know your dataset so I cannot determine if this is the cause, but something else to consider as to how what I described could occur.
Dean
Dr. Dean C. Adams
Professor
Department of Ecology, Evolution, and Organismal Biology
Department of Statistics
Iowa State University
www.public.iastate.edu/~dcadams/
phone: 515-294-3834
--
You received this message because you are subscribed to the Google Groups "geomorph R package" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
geomorph-r-pack...@googlegroups.com.
To post to this group, send email to
geomorph-...@googlegroups.com.
Visit this group at
https://groups.google.com/group/geomorph-r-package.
To view this discussion on the web, visit https://groups.google.com/d/msgid/geomorph-r-package/dcd92746-9c72-446a-90e2-100cd5011799%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "geomorph R package" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geomorph-r-pack...@googlegroups.com.
To post to this group, send email to geomorph-...@googlegroups.com.
Visit this group at https://groups.google.com/group/geomorph-r-package.
To view this discussion on the web, visit https://groups.google.com/d/msgid/geomorph-r-package/f068b147-f6f2-45ce-bd7b-81bc78704ca2%40googlegroups.com.
<Rplot_after superimposition_2.pdf><Rplot_PCA_Population_2.pdf>
Or perhaps a bit more straightforward, use advanced.procD.lm. This may be used for pairwise comparisons, but as part of the output generates a matrix of means for the groups. These could then be re-arranged into a 3D array for use in plotTangentSpace. A modified example from the help file is below.
Best,
Dean
###
data(plethodon)
Y.gpa<-gpagen(plethodon$land) #GPA-alignment
gdf <- geomorph.data.frame(Y.gpa, species = plethodon$species, site = plethodon$site)
myresults<-advanced.procD.lm(coords ~ site*species, ~ site + species, groups = ~site*species,
iter=499, data = gdf)
means<-arrayspecs(myresults$LS.means,p=12,k=2)
plotTangentSpace(means)
Dr. Dean C. Adams
Professor
Department of Ecology, Evolution, and Organismal Biology
Department of Statistics
Iowa State University
www.public.iastate.edu/~dcadams/
phone: 515-294-3834
From: geomorph-...@googlegroups.com [mailto:geomorph-...@googlegroups.com] On Behalf Of Milena Stefanovic
Sent: Monday, October 24, 2016 9:57 AM
To: geomorph R package <geomorph-...@googlegroups.com>
--
You received this message because you are subscribed to the Google Groups "geomorph R package" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
geomorph-r-pack...@googlegroups.com.
To post to this group, send email to
geomorph-...@googlegroups.com.
Visit this group at
https://groups.google.com/group/geomorph-r-package.
To view this discussion on the web, visit https://groups.google.com/d/msgid/geomorph-r-package/7cf275ba-e32a-41f4-bf93-f36ede299774%40googlegroups.com.