Plan <- read.table("https://husson.github.io/livre_exo/chap12_ex3.csv", header = TRUE, sep=";",row.names=1, encoding = "latin1") for (i in 1:2) Plan[,i] <- as.factor(Plan[,i]) X <- model.matrix(~ F1+F2, Plan, contrasts = "contr.sum") t(X)%*%X solve(t(X)%*%X) library(FactoMineR) AovSum(Y ~F1 + F2, data = Plan)