I have a linear model with a test score variable as a dependent variable and a vector of covariates. I have an offset variable in the model.
So the formula is=
$$\text{score}_i = B_0 + B_xX_x + offset_i + e_i$$
or equivalently:
$$\text{score}_i - \text{offset}_i = B_0 + B_xX_x + e_i$$
I estimate this in R using
lm(score ~ covariates, offset=offset, data=data)
When running this, I get an $R^2$ of $0.55$.
Then, I create a different dependent variable, subtracting the offset manually, so the formula is:
$$\text{score-offset}_i = B_0 + B_xX_x + e_i$$
I get a different $R^2$ -- substantially less: $0.10$.
I'd like to know why these calculations are different. Obviously, this is a large difference. Prof. Ripley here http://r.789695.n4.nabble.com/Calculation-of-r-squared-for-linear-model-with-offset-td797608.html notes that $R^2$ is calculated differently in the presence of an offset, but I'm not sure how.