Plan <- read.table("https://husson.github.io/livre_exo/chap13_ex21.csv", header = TRUE, sep=";",row.names=1, encoding = "latin1") for (i in 1:3) Plan[,i] <- as.factor(Plan[,i]) X <- model.matrix(~ MG + Arôme + Technologie, Plan, contrasts = "contr.sum") cor(X) solve(t(X)%*%X)