Juan Antonio Balbuena
2012-May-23 15:19 UTC
[R] procrustes (vegan) plot of residual differences
Hello This is a simple question but I couldn't google an answer. In the procrustes function of the vegan package, one uses plot(procrustes_object, kind=2) to obtain a plot of the residual differences. For instance: data(varespec) vare.dist <- vegdist(wisconsin(varespec)) library(MASS) mds.null <- isoMDS(vare.dist, tol=1e-7) mds.alt <- isoMDS(vare.dist, initMDS(vare.dist), maxit=200, tol=1e-7) vare.proc <- procrustes(mds.alt, mds.null) plot(vare.proc, kind=2) In the resulting plot 3 horizontal lines (1 continuous and 2 dashed) are displayed and I was wondering what they actually represent. (Perhaps mean residual +/- 95% CI ?). I would also like to know whether it is possible to customize the plot by, for instance, removing the lines, changing their appearance, or making them represent something else, such as mean +/- SD. Thank you very much for your attention. Juan Antonio Balbuena -- Dr. Juan A. Balbuena Marine Zoology Unit Cavanilles Institute of Biodiversity and Evolutionary Biology University of Valencia [1]http://www.uv.es/~balbuena P.O. Box 22085 [2]http://www.uv.es/cavanilles/zoomarin/index.htm 46071 Valencia, Spain [3]http://cetus.uv.es/mullpardb/index.html e-mail: [4]j.a.balbuena at uv.es tel. +34 963 543 658 fax +34 963 543 733 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ NOTE! For shipments by EXPRESS COURIER use the following street address: C/ Catedr??tico Jos?? Beltr??n 2, 46980 Paterna (Valencia), Spain. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ References 1. http://www.uv.es/%7Ebalbuena 2. http://www.uv.es/cavanilles/zoomarin/index.htm 3. http://cetus.uv.es/mullpardb/index.html 4. mailto:j.a.balbuena at uv.es
On 2012-05-23 08:19, Juan Antonio Balbuena wrote:> > Hello > This is a simple question but I couldn't google an answer. > In the procrustes function of the vegan package, one uses > plot(procrustes_object, kind=2) to obtain a plot of the residual > differences. For instance: > data(varespec) > vare.dist<- vegdist(wisconsin(varespec)) > library(MASS) > mds.null<- isoMDS(vare.dist, tol=1e-7) > mds.alt<- isoMDS(vare.dist, initMDS(vare.dist), maxit=200, tol=1e-7) > vare.proc<- procrustes(mds.alt, mds.null) > plot(vare.proc, kind=2) > > In the resulting plot 3 horizontal lines (1 continuous and 2 dashed) are > displayed and I was wondering what they actually represent. (Perhaps mean > residual +/- 95% CI ?). > I would also like to know whether it is possible to customize the plot by, > for instance, removing the lines, changing their appearance, or making them > represent something else, such as mean +/- SD. > Thank you very much for your attention. > Juan Antonio BalbuenaIf you take a look at the bottom of vegan:::plot.procrustes, you will see that the lines represent the (type 7) quartiles of the residuals of vare.proc and that these are plotted with a single abline() call. To modify the plot, you could make a (renamed) copy, comment out the abline() bit and then add the lines of your choice. But, really, it's just a plot of the residuals with type="h", so why not just create your own plot? Peter Ehlers> > -- > > Dr. Juan A. Balbuena > Marine Zoology Unit > Cavanilles Institute of Biodiversity and Evolutionary Biology > University of > Valencia > [1]http://www.uv.es/~balbuena > P.O. Box 22085 > [2]http://www.uv.es/cavanilles/zoomarin/index.htm > 46071 Valencia, Spain > [3]http://cetus.uv.es/mullpardb/index.html > e-mail: [4]j.a.balbuena at uv.es tel. +34 963 543 658 fax +34 963 543 733 > ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > NOTE! For shipments by EXPRESS COURIER use the following street address: > C/ Catedr??tico Jos?? Beltr??n 2, 46980 Paterna (Valencia), Spain. > ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > > References > > 1. http://www.uv.es/%7Ebalbuena > 2. http://www.uv.es/cavanilles/zoomarin/index.htm > 3. http://cetus.uv.es/mullpardb/index.html > 4. mailto:j.a.balbuena at uv.es > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.