[R] Correspondence analysis with R -follow up

Gavin Simpson gavin.simpson at ucl.ac.uk
Fri Jul 21 10:10:56 CEST 2006


On Thu, 2006-07-20 at 16:40 +0000, Emanuele Mazzola wrote:
> Hi all,
> 
> thank you for your answers; i've tried both cca from vegan library, and 
> dudi.coa from ade4 library; one last question: my deal is mainly with 
> contingency tables, like the one i'm posting here
> 
> acciaieria<-c(.41,.02,.44,.04,.09)
> laminatoio<-c(.34,.28,.26,.01,.11)
> fonderia<-c(.48,.05,.34,.08,.05)
> leghe<-c(.45,.19,.25,.03,.08)
> pct<-cbind(acciaieria,laminatoio,fonderia,leghe)
> pct<-data.frame(pct,row.names=c("normale","preparaz.","manutenz.","installaz.","trasferim."))
> 
> BUT...cca and dudi.coa seem to return quite different graphical results; 
> where am i doing wrong?
> Do they do the same to you with the table above?
> 
> Thank you very much again!
> Bye
> Emanuele

Hi, I haven't used ade4 at all, but as long as you did CA correctly
using ade4 functions, I doubt the plotted results differ really in all
but cosmetic ways or perhaps in terms of the scalings used.

You are plotting two bits of information in the biplot and you can only
represent one of those optimally, or you could compromise and plot with
symmetric scaling. Or you could plot them in a multitude of ways - there
are whole books on biplots!

Take a look at argument scaling in ?plot.cca (for vegan). Try plotting
your CA with different scalings and see if that better matches the CA
from ade4, eg:

library(vegan)
mod <- cca(pct)
plot(mod) # default is scaling = 2
plot(mod, scaling = 1)
plot(mod, scaling = 3)

If using vegan, you might want to look at Jari Oksanens Vegan Tutorial
for more info on using his functions:

http://cc.oulu.fi/~jarioksa/opetus/metodi/vegantutor.pdf

If this doesn't help your understanding or problem, post back with the
ade4 and vegan code you are using and I'll have a look.

G
-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
 *Note new Address and Fax and Telephone numbers from 10th April 2006*
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
Gavin Simpson                     [t] +44 (0)20 7679 0522
ECRC                              [f] +44 (0)20 7679 0565
UCL Department of Geography
Pearson Building                  [e] gavin.simpsonATNOSPAMucl.ac.uk
Gower Street
London, UK                        [w] http://www.ucl.ac.uk/~ucfagls/cv/
WC1E 6BT                          [w] http://www.ucl.ac.uk/~ucfagls/
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%



More information about the R-help mailing list