Skip to main content
2 of 2
added 4 characters in body

In an Anova table in Multivariate regression, why does changing the order of the covariates change the (Reg) Sum of Squares and p-value?

Say I fit a multivariate model in R lm(Y~X1 + X2 + X3) and get a certain output for an ANOVA table.

Why does the ANOVA table ( using anova() ) for the model lm(Y ~ X1 + X3 + X2) produce different values for the Sum of Squares in the X3 row than in the first model?

I know the order matters, but could you explain further on how changing the order changes the Sum of Squares and corresponding p-value for X3?