Re: ADE4 sous R

From: Daniel Chessel (chessel@biomserv.univ-lyon1.fr)
Date: Mon May 12 2003 - 17:09:19 MEST


At 10:02 12/05/2003 +0000, Raphaëlle Pin wrote:
>Bonjour,
>
>Etant débutante sous R, j'ai une petite question à laquelle, je pense, quelqu'un du forum pourra répondre. Je voudrais savoir:
>- comment obtenir les contributions des variables (et des individus) à chaque axe factoriel, lorque on fait une AFCM avec la fonction dudi.acm de R?
>
>Merci beaucoup et bonne journée à tous,
>Raphaelle Pin

Très simplement par inertia.dudi

exemple :
 data(ours)
 unlist(lapply(ours,is.factor))
 altit deniv cloiso domain boise hetra favor inexp citat depart
  TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
 dudi1<-dudi.acm(ours)
Select the number of axes: 3
 inertia.dudi(dudi1,col=T)
$TOT REPARTITION DE L4INERTIE ENTRE LES AXES
    inertia cum ratio
1 0.445810 0.4458 0.1783
2 0.322821 0.7686 0.3075
3 0.250024 1.0187 0.4075
...
$col.abs CONTRIBUTIONS ABSOLUES DES COLONNES
           Comp1 Comp2 Comp3
altit.X1 393 340 425
altit.X2 1 18 141
altit.X3 269 374 7
...

$col.rel CONTRIBUTIONS RELATIVES DES COLONNES
           Comp1 Comp2 Comp3 con.tra
altit.X1 2218 -1392 1346 316
altit.X2 4 -106 -638 221
altit.X3 -1820 1837 -25 263
deniv.X1 1024 158 -1036 263
...

$col.cum CONTRIBUTIONS RELATIVES DES COLONNES
           Comp1 Comp2 Comp3 remain
altit.X1 2218 3610 4956 5044
altit.X2 4 111 749 9251
altit.X3 1820 3658 3683 6317
deniv.X1 1024 1182 2218 7782

Pour avoir les lignes
 inertia.dudi(dudi1,row=T)

pour retrouver les fonctions qui parle d'inertie
 apropos("inertia")
[1] "coinertia" "inertia.dudi" "plot.coinertia"
[4] "print.coinertia" "randtest.coinertia" "summary.coinertia"

POur une ACM les statistiques d'inertie sont de peu d'intérêt (voir Lebart, L., A. Morineau, and M. Piron. 1995. Statistique exploratoire multidimensionnelle. Dunod, Paris p. 137). Utiliser plutôt les rapports de corrélation qui sont dans :

 dudi1$cr
          RS1 RS2 RS3
altit 0.2951 0.2366 0.143236
deniv 0.2793 0.1548 0.108410
cloiso 0.1739 0.3509 0.294907
domain 0.1670 0.6531 0.257534
boise 0.6468 0.1621 0.198654
hetra 0.6859 0.1095 0.462111
favor 0.6674 0.1026 0.008974
inexp 0.3755 0.2967 0.105386
citat 0.6945 0.5662 0.375304
depart 0.4726 0.5956 0.545724
Voir http://pbil.univ-lyon1.fr/R/articles/arti040.pdf
qui montre qu'on a de la suite dans les idées

Daniel Chessel



This archive was generated by hypermail 2b30 : Tue Sep 07 2004 - 13:45:21 MEST