Monica Pisica
2008-Apr-18 18:45 UTC
[R] Correspondence and detrended correspondence analysis
Hi, I hope someone knows the answer to this or has a real good reference about it (I am using Legendre & Legendre, Numerical Ecology, 1998).... My data is a data.frame with locations as rows and vegetation assemblages / species as columns. I've done a PCA, a correspondance analysis (CA) using ca in ca package and a detrended correspondance analysis (DCA) using decorana from vegan package. As far as i understand what i've done .... the relationships between vegetation categories and locations should be similar in all 3 analysis, although the 'arch' in locations / sites seen in the CA plot should be flatten out by the DCA - which it is!. My problem is that the locations / sites are flipped in the DCA plot versus PCA or CA plots (locations with positive coordinates now have negative coordinates in DCA versus CA or PCA), although the vegetation categories keep same relationships between them in all three plots - which is expected. If some code is required i can provide it but i didn't want to clutter the message too much. But i am providing the resulting plots in case they will make my problem clearer. PCA plot: ftp://stpfiles.er.usgs.gov/Monica/R_Data/pca_veg_lidarclass_phase2.pdf CA plot: ftp://stpfiles.er.usgs.gov/Monica/R_Data/corresp_anal_phase2.pdf DCA plot: ftp://stpfiles.er.usgs.gov/Monica/R_Data/detrend_corresp_anal_phase2.pdf DCA how i would expect it: ftp://stpfiles.er.usgs.gov/Monica/R_Data/detrend_corresp_anal_phase2_a.pdf Any thoughts on this will be very much appreciated, Monica _________________________________________________________________ esh_getintouch_042008
Gavin Simpson
2008-Apr-19 10:18 UTC
[R] Correspondence and detrended correspondence analysis
On Fri, 2008-04-18 at 18:45 +0000, Monica Pisica wrote:> Hi, > > I hope someone knows the answer to this or has a real good reference > about it (I am using Legendre & Legendre, Numerical Ecology, 1998).... > My data is a data.frame with locations as rows and vegetation > assemblages / species as columns. I've done a PCA, a correspondance > analysis (CA) using ca in ca package and a detrended correspondance > analysis (DCA) using decorana from vegan package. As far as i > understand what i've done .... the relationships between vegetation > categories and locations should be similar in all 3 analysis, although > the 'arch' in locations / sites seen in the CA plot should be flatten > out by the DCA - which it is!. > > My problem is that the locations / sites are flipped in the DCA plot > versus PCA or CA plots (locations with positive coordinates now have > negative coordinates in DCA versus CA or PCA), although the vegetation > categories keep same relationships between them in all three plots - > which is expected. If some code is required i can provide it but i > didn't want to clutter the message too much. But i am providing the > resulting plots in case they will make my problem clearer.The sign of the eigenvectors (axis scores) is not defined, just the magnitude; using the same software on different machines may produce "flipped". Furthermore, the same analysis, PCA say, done using different software but on the same machine may not have the same sign, i.e. be flipped, depending on algorithm used etc. There is nothing wrong here. You'd be better off asking yourself which is the appropriate technique to fit for your data rather than fitting them all... HTH G> > PCA plot: > ftp://stpfiles.er.usgs.gov/Monica/R_Data/pca_veg_lidarclass_phase2.pdf > CA plot: > ftp://stpfiles.er.usgs.gov/Monica/R_Data/corresp_anal_phase2.pdf > DCA plot: > ftp://stpfiles.er.usgs.gov/Monica/R_Data/detrend_corresp_anal_phase2.pdf > DCA how i would expect it: > ftp://stpfiles.er.usgs.gov/Monica/R_Data/detrend_corresp_anal_phase2_a.pdf > > Any thoughts on this will be very much appreciated, > > Monica > > > _________________________________________________________________ > > > esh_getintouch_042008 > ______________________________________________ > 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.-- %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% Dr. Gavin Simpson [t] +44 (0)20 7679 0522 ECRC, UCL Geography, [f] +44 (0)20 7679 0565 Pearson Building, [e] gavin.simpsonATNOSPAMucl.ac.uk Gower Street, London [w] http://www.ucl.ac.uk/~ucfagls/ UK. WC1E 6BT. [w] http://www.freshwaters.org.uk %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
Monica Pisica
2008-Apr-19 14:17 UTC
[R] Correspondence and detrended correspondence analysis
Gavin, Thank you very much for the explanation .... it is very assuring ..... I knew that the sign of the eigenvectors can flip but i was puzzled that always PCA and CA came one way and DCA the other way - i mean flipped every time i've run the analysis .... the idea was to use different ordinations to see which might explain the best the vegetation assemblages and their correlation with the unsupervised classification i've done for the locations. For now DCA is very promising in spite of the criticism some ecologists have against it. So you are right - i don't need all of them - but i wanted to do all so if i choose one and i am asked why i didn't do some other one - i can have an answer ready ;-) Again, thanks, Monica> Subject: Re: [R] Correspondence and detrended correspondence analysis> From: gavin.simpson@ucl.ac.uk> To: pisicandru@hotmail.com> CC: r-help@r-project.org> Date: Sat, 19 Apr 2008 11:18:25 +0100> > On Fri, 2008-04-18 at 18:45 +0000, Monica Pisica wrote:> > Hi,> > > > I hope someone knows the answer to this or has a real good reference> > about it (I am using Legendre & Legendre, Numerical Ecology, 1998)....> > My data is a data.frame with locations as rows and vegetation> > assemblages / species as columns. I've done a PCA, a correspondance> > analysis (CA) using ca in ca package and a detrended correspondance> > analysis (DCA) using decorana from vegan package. As far as i> > understand what i've done .... the relationships between vegetation> > categories and locations should be similar in all 3 analysis, although> > the 'arch' in locations / sites seen in the CA plot should be flatten> > out by the DCA - which it is!.> > > > My problem is that the locations / sites are flipped in the DCA plot> > versus PCA or CA plots (locations with positive coordinates now have> > negative coordinates in DCA versus CA or PCA), although the vegetation> > categories keep same relationships between them in all three plots -> > which is expected. If some code is required i can provide it but i> > didn't want to clutter the message too much. But i am providing the> > resulting plots in case they will make my problem clearer.> > The sign of the eigenvectors (axis scores) is not defined, just the> magnitude; using the same software on different machines may produce> "flipped". Furthermore, the same analysis, PCA say, done using different> software but on the same machine may not have the same sign, i.e. be> flipped, depending on algorithm used etc.> > There is nothing wrong here. You'd be better off asking yourself which> is the appropriate technique to fit for your data rather than fitting> them all...> > HTH> > G> > > > > PCA plot:> > ftp://stpfiles.er.usgs.gov/Monica/R_Data/pca_veg_lidarclass_phase2.pdf> > CA plot:> > ftp://stpfiles.er.usgs.gov/Monica/R_Data/corresp_anal_phase2.pdf> > DCA plot:> > ftp://stpfiles.er.usgs.gov/Monica/R_Data/detrend_corresp_anal_phase2.pdf> > DCA how i would expect it:> > ftp://stpfiles.er.usgs.gov/Monica/R_Data/detrend_corresp_anal_phase2_a.pdf> > > > Any thoughts on this will be very much appreciated,> > > > Monica> > > > > > _________________________________________________________________> > > > > > esh_getintouch_042008> > ______________________________________________> > R-help@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.> -- > %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%> Dr. Gavin Simpson [t] +44 (0)20 7679 0522> ECRC, UCL Geography, [f] +44 (0)20 7679 0565> Pearson Building, [e] gavin.simpsonATNOSPAMucl.ac.uk> Gower Street, London [w] http://www.ucl.ac.uk/~ucfagls/> UK. WC1E 6BT. [w] http://www.freshwaters.org.uk> %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%> _________________________________________________________________ esh_getintouch_042008 [[alternative HTML version deleted]]