R squared

Post Reply
Spacebat1
Posts: 3
Joined: July 22nd, 2019, 12:48 pm

R squared

Post by Spacebat1 » July 22nd, 2019, 12:56 pm

Hi,

Sorry if this is too trivial but I can't figure it out. I have a dataset to which I fitted lines (simple linear regression, one line with the linear component fixed, and one free fit). This works fine, and the dataset is good but for my life I cannot figure out how to get the R2 measure. Both curves should give a fit very should be close to 1 but under under the "Report" tab I can't find anything that says "R^2" and/or is close to 1.

Thanks!
//d

User avatar
MagicPlot
Site Admin
Posts: 38
Joined: December 27th, 2018, 5:24 pm
Location: St. Petersburg
Contact:

Re: R squared

Post by MagicPlot » July 22nd, 2019, 2:28 pm

Hello,

The Fit Report contains such rows with values for the last fit runned:

Code: Select all

Coefficient of Determination R^2: ...
Adjusted R^2: ...
The R squared shows not only "how good the parameter values are" but also "how good the fit model (formula) is". So R^2 also depends on the amount of the noize in your data and "is it really a straight line":
https://en.wikipedia.org/wiki/Coefficie ... ermination

Spacebat1
Posts: 3
Joined: July 22nd, 2019, 12:48 pm

Re: R squared

Post by Spacebat1 » July 22nd, 2019, 2:44 pm

Hi, thanks for taking the time, and sorry if I'm unclear.

The dataset looks like this:
Image

RESULTS
Iterations: 4
Convergence: 0
Residual Sum of Squares (RSS, χ^2): 0.0281
Reduced RSS: 0.0056
Residual Standard Deviation: 0.075
Coefficient of Determination R^2: 0
Adjusted R^2: -0.25

Image

RESULTS
Iterations: 2
Convergence: 1.5543e-15
Residual Sum of Squares (RSS, χ^2): 0.0173
Reduced RSS: 0.0043
Residual Standard Deviation: 0.0658
Coefficient of Determination R^2: 0.3843
Adjusted R^2: -0.0262

It seems that there is something off, I would expect the R^2 to be 0.99 or something, but it shows as 0 and 0.38 I just can't figure out where it goes tits up.

Thanks!
/d

User avatar
MagicPlot
Site Admin
Posts: 38
Joined: December 27th, 2018, 5:24 pm
Location: St. Petersburg
Contact:

Re: R squared

Post by MagicPlot » July 22nd, 2019, 3:09 pm

The low R^2 only says that your data is "not likely a straight line": the linear formula does not predict the "haotic" variance of the points. If you change the scale, you can see it as the algorithm sees it (I placed some points manually, that's not exactly your points).
Table 1 B.png
Table 1 B.png (103.23 KiB) Viewed 878 times

Spacebat1
Posts: 3
Joined: July 22nd, 2019, 12:48 pm

Re: R squared

Post by Spacebat1 » July 22nd, 2019, 3:36 pm

OK, I think I understand now!

Thank you so much for you rapid response, and support!
//d

Post Reply