# afc_ex_corr.r library(ca) ############## # Exercice 6.1 load("legislatives.rda") # Création d'une table de contingence T <- xtabs(~Legislatives$Age+Legislatives$Appartenance) # Analyse Afc <- ca(T) summary(Afc) # Graphique plot(Afc,mass=c("TRUE","TRUE")) ############## # Exercice 6.2 load("TravailDomicile.rda") TD <- TravailDomicile # Analyse Afcm <- mjca(TD,ps=": ") summary(Afcm) # Graphique plot(Afcm,what=c("none","all")) plot(Afcm,dim=c(1,3),what=c("none","all")) # Analyse alternative (Burt) Afcm2 <- mjca(TD,ps=": ",lambda="Burt") summary(Afcm2) # Graphique plot(Afcm2,what=c("none","all")) plot(Afcm2,dim=c(1,3),what=c("none","all"))