Why doesn't Prism report R2 for linear regression when I force the line through the origin (or some other point)?
When you constrain a line to go through a point, there would be two ways to compute R2:
- Compare the fit of the best-fit line with the fit of a horizontal line at the mean Y value. But that null hypothesis (horizontal line through the Ymean) doesn't obey the constraint that it go through the origin.
- Compare the best-fit line with a horizontal line at Y=0. This obeys the constraint, but often fits the data really badly, pushing up the R2 value.
Since R2 is ambiguous when you constrain linear regression, we chose to simply not report it with Prism. But you can get the value if you want:
- Choose nonlinear (rather than linear) regression.
- Choose a straight line model
- Set the constraint (intercept=0).
The nonlinear regression results include R2, using the first definition above (the null hypothesis therefore does not follow the constraint).
Keywords: force constrain