Walter Morgan already gave a good explanation. Let me just add a few more things:
1) Intuition seems to tell us that r^2 cannot increase when we fix one or more parameters in the linear model. After all, the sum of squared residuals (SSR) is minimized by an unconstrained OLS procedure, so any constraints should result in a larger SSR and hence a worse fit (note that the two different models are nested). The surprising fact is not that r^2 changes when we change the model; it's surprising that r^2 increases when we restrict our model space.
2) The answer has to be that different definitions of r^2 have been used. Whereas there's no debate about the proper definition of r^2 in the unconstrained OLS setting, different software packages use different definitions of r^2 in the presence of constraints on parameters. Why is that? With unconstrained OLS, r^2 has several nice properties, e.g. it's always between 0 and 1, it may be written in different equivalent forms etc. With constrained OLS, the different textbook formulas are not equivalent anymore, and depending on which formula one uses, some of the nice properties of r^2 from unconstrained OLS are gone.
3) Often, r^2 is computed as follows: r^2 = 1 - SSR/(variance of y_i). If one uses this formula with constrained OLS, it follows our intuition: the SSR gets larger, therefore r^2 decreases. But there is a drawback: with constrained OLS, this formula is not guaranteed to be >= 0, so you can get a negative r^2. Some users might not like this. But actually, this formula is used in software products, e.g. in Excel: if beta_0 is fixed, when calculating a "trend line" in Excel, a negative value of r^2 might result.
4) If you want an r^2 which is always between 0 and 1 in the constrained case, you can look more closely into why r^2 actually is between 0 and 1 in the unconstrained case: it's because of the equation
sum(y_i - mean(y))^2 = SSR + sum (hat(y_i) - mean(y))^2
This equation is a decomposition of the variance into two non-negative terms, and its derivation relies on the arithmetic of the unconstrained OLS estimation. When the intercept is fixed at beta_0, this equation is no longer valid. However, if we substitute mean(y) by beta_0, we get a valid equation in the case of OLS estimation with fixed intercept (it's not obvious, you have to do the calculus):
sum(y_i - beta_0)^2 = SSR + sum (hat(y_i) - beta_0)^2
From this it follows, that 1 - SSR/sum(y_i - beta_0)^2 is always between 0 and 1. One might thus define this formula as r^2 in the case of fixed intercept. And this is actually done in several software packages. Is this better than the definition used in Excel or even some other measure of model fit? You can argue on this indefinitely (as has been in the literature).
(BTW, since you did not tell us which software you use, you might have implemented yet another formula for r^2 in your software.)
Best,
-Hans-
------------------------------
Hans Kiesl
Regensburg University of Applied Sciences
Germany
Original Message:
Sent: 03-26-2016 14:42
From: Uday Jha
Subject: Intercept Value
By changing the value of intercept (beta 0) to 1, the value of R-Squared and R-Squared adjusted changes from 30 percent to about 95 percent. Though it is highly desirable, I am unable to understand the exact theory behind this. Could someone explain this?
Thank you
------------------------------
Uday Jha
Rochester Institute of Technology
------------------------------