## R squared

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

### R squared

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

MagicPlot
Posts: 61
Joined: December 27th, 2018, 5:24 pm
Location: St. Petersburg
Contact:

### Re: R squared

Hello,

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

Code: Select all

``````Coefficient of Determination 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

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

The dataset looks like this: RESULTS
Iterations: 4
Convergence: 0
Residual Sum of Squares (RSS, χ^2): 0.0281
Residual Standard Deviation: 0.075
Coefficient of Determination R^2: 0 RESULTS
Iterations: 2
Convergence: 1.5543e-15
Residual Sum of Squares (RSS, χ^2): 0.0173
Residual Standard Deviation: 0.0658
Coefficient of Determination R^2: 0.3843

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

MagicPlot
Posts: 61
Joined: December 27th, 2018, 5:24 pm
Location: St. Petersburg
Contact:

### Re: R squared

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 (103.23 KiB) Viewed 3824 times

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

### Re: R squared

OK, I think I understand now!

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