I am carrying a linear regression on some data. One of my variables is a factor (categorical). Using regression with an intercept leads to difficult interpretation, since one of the factor levels is taken as the intercept, and the remaining levels are given relative to that. Removing the intercept give me an effect of each level of the factor, which I what I want.
As far as I know, both models are precisely equivalent. They produce identical predictions (on the training set) - to within ~3e-15. However, their R² scores vary wildly.
# MWE library(car) int <- lm(fscore ~ 1 + partner.status + conformity + fcategory, data = Moore) #with intercept nint <- lm(fscore ~ 0 + partner.status + conformity + fcategory, data = Moore) #w/o intercept summary(int)$r.squared summary(nint)$r.squared #R² values are not remotely the same max(predict(int)-predict(nint)) #Predictions are essentially identical
Why are the models not identical? Is it because R² is a comparision of the model to "no model", and that "no model" corresponds to "y=0" and "y=mean(fscore)", for nint and int, respectively?