Re: [R] Correspondence analysis with R -follow up

From: <bady_at_univ-lyon1.fr>
Date: Fri 21 Jul 2006 - 18:41:38 EST

Hi, 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."))
>

the data.frame "pct" is not a contingency table.

> 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?

graphicals reults are similar.
see the argument "method" in the function scatter.coa (library ade4). "...
  method: an integer between 1 and 3

           1 Rows and columns with the coordinates of lambda variance
           2 Rows variance 1 and columns by averaging
           3 Columns variance 1 and rows by averaging
..."

#example :
require(ade4)
data(rpjdl)
coa1 <- dudi.coa(rpjdl$fau, scannf = FALSE, nf = 4) require(vegan)
coa2 <- cca(rpjdl$fau)

# biplot representations
par(mfrow=c(2,2))
plot(coa2,type="text")
? scatter.coa

scatter(coa1,method=1)
scatter(coa1,method=2)
scatter(coa1,method=3)


hope this help :)

Pierre



R-help@stat.math.ethz.ch 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. Received on Fri Jul 21 18:45:52 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Fri 21 Jul 2006 - 20:16:52 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.