Why does removing intercept not change predicition of linear model in the precence of factor predictors? In a linear model that predicts birth rate (TFR) per country from per capita GDP, the country is encoded in "treatment coding", and there are several measurements (different years) per country. I would thus have thought that the first level represents the "reference intercept" and the predictions for only this first level should change when the intercept is removed from the model.
However, the predictions do not change for any country, if I remove the intercept:
> fit1 <- lm(TFR ~ logGDPpc + logGDPpc2 + 
                    country, data=x)
> fit2 <- lm(TFR ~ logGDPpc + logGDPpc2 + 
                    country - 1, data=x)
> max(abs(fit1$fitted.values - 
          fit2$fitted.values))
[1] 1.847411e-13

This also applies to the relative error of the differences:
> max(abs((fit1$fitted.values - 
   fit2$fitted.values)/fit2$fitted.values))
[1] 7.482906e-14

Is this the expected behavior? Why?

These are two parameterizations of the same model. Look at the regression coefficients for each model, and you will see the same number of parameters.
In the first model, the model intercept is the $y$ intercept for the first country, and the coefficients for the other countries are differences between that country's intercept and the first country's.
In the second model, the absence of the overall intercept causes R to create indicators for all of the countries. The regression coefficients for the countries will be their respective $y$ intercepts; so the first one's coefficient will equal the intercept of the first model.
