Using auto.dta, a regression of price against miles per gallon yields an intercept of 11,253.06.
The command twoway (scatter price mpg) (lfit price mpg) produces the following graph...

...where the fit line is clearly going to intercept the y axis below 10,000, contradicting the regression output.
However, we can tell Stata to draw the fit line only over a certain range of the regressor by typing, for example, twoway (scatter price mpg) (lfit price mpg, range(0 20))

The fit line now seems to be (correctly) headed towards the intercept of the regression output.
What is going on?
P.S. I would imagine someone already noticed this, but I couldn't find anything through the search. Also, the link to the pre-April 2014 archives is not working anymore. What's up with that?
The command twoway (scatter price mpg) (lfit price mpg) produces the following graph...
...where the fit line is clearly going to intercept the y axis below 10,000, contradicting the regression output.
However, we can tell Stata to draw the fit line only over a certain range of the regressor by typing, for example, twoway (scatter price mpg) (lfit price mpg, range(0 20))
The fit line now seems to be (correctly) headed towards the intercept of the regression output.
What is going on?
P.S. I would imagine someone already noticed this, but I couldn't find anything through the search. Also, the link to the pre-April 2014 archives is not working anymore. What's up with that?
Comment