# Exemple 1 tab<-matrix(c(68,119,26,7, 15,54,14,10, 5,29,14,16, 20,84,17,94),ncol=4,byrow=TRUE) colnames(tab) <- c("brun", "chatain", "roux", "blond") rownames(tab) <- c("marron", "noisette", "vert", "bleu") summary(as.table(tab)) afc <-dudi.coa(tab, scan = FALSE) afcin <- inertia.dudi(afc,col.inertia=T,row.inertia=T) afcin$TOT scatterutil.eigen(afc$eig,nf=3,box=T,sub="") scatter(afc, method=1,clab.row=0.90,clab.col=1.5,posieig="none") # Exemple 2 tab<-matrix(c(80,36,134,99,65,28,11,58, 6,2,15,6,4,1,1,4, 168,74,312,137,208,53,21,62, 470,191,806,400,876,164,45,79, 236,99,493,264,281,56,36,87, 145,52,281,133,135,30,20,54, 166,64,401,193,127,23,28,129, 16,6,27,11,8,2,2,8, 305,115,624,247,301,47,42,90), ncol=8,byrow=TRUE) colnames(tab) <- c("Droit", "ScEco", "Lettres", "Sciences", "Med", "Pharma", "Pluri", "IUT") rownames(tab) <- c("ExpAgr", "Salar", "Patron", "Lib", "CadreMoy", "Empl", "Ouvrier", "Service", "Autres") # summary(tab) afc <-dudi.coa(tab, scan = FALSE) afcin <- inertia.dudi(afc,col.inertia=T,row.inertia=T) afcin$TOT scatterutil.eigen(afc$eig,nf=3,box=T,sub="") scatter(afc, method=1,clab.row=0.90,clab.col=1.5,posieig="none") # Exemple 3 tab<-matrix(c(258495,184419,114222,57183,39052,22479,13277,5006,434078, 128715,114003,48782,71897,25732,19738,11980,7085,301478, 150141,140634,96746,61676,23292,15998,13939,6486,329626, 144581,95451,59967,54309,26732,17545,12108,5346,270414, 143444,136677,122610,47279,32987,16438,11322,4690,314964, 107327,61507,40081,54412,49535,19619,8393,5176,287618, 126569,93049,60234,47074,41897,17308,10969,4557,286913, 111176,82524,47903,55165,24693,17018,9876,4825,262458), ncol=9,byrow=TRUE) colnames(tab) <- c("HUCHON","COPE","SANTINI", "LEPEN","BUFFET","LAGU","PELEG","BAY","ABSTEN") rownames(tab) <- c("PARI","SMAR","YVEL","ESSO","HTSS", "STDE","VDMA","VDOI") afc <-dudi.coa(tab, scan = FALSE) afcin <- inertia.dudi(afc,col.inertia=T,row.inertia=T) afcin$TOT scatterutil.eigen(afc$eig,nf=3,box=T,sub="") scatter(afc, method=1,clab.row=0.90,clab.col=1.5,posieig="none") plot(table.value(tab, grid=T))