0
$\begingroup$

I’m estimating a bivariate OLS model and I want to deepen my understanding of $R^2$. Therefore I’m trying to visualize it by plotting my predicted values vs. actual values of the DV.

I expected the correlation (i.e., $R^2$) of a linear trend line through these points would be equal to the $R^2$ for the overall bivariate model.

However that’s not happening. Does $R^2$ measure the ability of the model (predicted values in this case) to explain the variation in the observed values?

EDIT:

I’ve created a model to help with this. The model uses the price of oil to predict raw material cost. It’s very a very biased model, but I don’t think that should matter for the purposes of understanding R^2 here. Am I wrong?

This is where my confusion is:

Predicted vs. Actual Values

EDIT 2:

Output from Regression:

enter image description here

$\endgroup$
  • 1
    $\begingroup$ The squared correlation between observed and predicted responses should equal the R-squared of the regression. $\endgroup$ – Michael M Oct 17 '16 at 4:04
  • $\begingroup$ Can you show the output from the regression as well? $\endgroup$ – mdewey Oct 17 '16 at 16:49
  • $\begingroup$ Here is the data: docs.google.com/spreadsheets/d/… $\endgroup$ – Paul Oct 17 '16 at 20:10
  • 1
    $\begingroup$ Something wrong with your regression output with N/A intercept figures. When I plugged your data to excel the R2 matched 24.7. I think you chose the "constant is 0" option, where you shouldn't have. $\endgroup$ – Cagdas Ozgenc Oct 17 '16 at 20:19
  • $\begingroup$ Cagdas - That did it, and lesson learned. THANK YOU!! $\endgroup$ – Paul Oct 17 '16 at 20:40
1
$\begingroup$

Yes, I would say that something appears "off" about your the output, which does indicate that R^2 for the model is around .9, while the graphical output indicates that it is .248.

The graph itself is consistent with the value (e.g. the scatterplot looks like a correlation of SQRT(.25), or approx .5).

Are you sure they come from the same data set?

$\endgroup$
  • $\begingroup$ Here is the data that is throwing the high r squared: docs.google.com/spreadsheets/d/… $\endgroup$ – Paul Oct 17 '16 at 19:57
  • $\begingroup$ Yeah, the correlation in this data is r = .49, r^2 = .25... Not sure what your output is indicating... You also have pretty heteroscedastic data which if this were a "real" regression analysis would require some thought. $\endgroup$ – Marina_ANOVA Oct 17 '16 at 20:45
  • $\begingroup$ Hi Marina - it turns out the model automatically was setting the constant at zero, which is inappropriate here. When I removed the constant, the world made sense again. Thanks so much for your time! $\endgroup$ – Paul Oct 17 '16 at 21:01
0
$\begingroup$

You are on the right path - the $R^2$ measures the proportion of the variance in the dependent variable that is predictable from the independent variable.
It basically tells you how good your observed values are reproduced by the model, based on the proportion of total variation of outcomes explained by the model.
It is $1- $ the fraction of the variance left unexplained (so fraction of "variance explained" by your model). hth.

$\endgroup$
  • 1
    $\begingroup$ Thanks for the response! See my EDIT, and please let me know if you have any additional thoughts. Regards, Paul. $\endgroup$ – Paul Oct 17 '16 at 16:34
  • $\begingroup$ Ok - I see Marina and Cagdas got you to the end of this. I guess the moral of the story is to always keep in mind the intercept term of regression. $\endgroup$ – davidski Oct 24 '16 at 9:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.