Page **1** of **1**

### R squared

Posted: **July 22nd, 2019, 12:56 pm**

by **Spacebat1**

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

### Re: R squared

Posted: **July 22nd, 2019, 2:28 pm**

by **MagicPlot**

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

### Re: R squared

Posted: **July 22nd, 2019, 2:44 pm**

by **Spacebat1**

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

Reduced RSS: 0.0056

Residual Standard Deviation: 0.075

Coefficient of Determination R^2: 0

Adjusted R^2: -0.25

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

### Re: R squared

Posted: **July 22nd, 2019, 3:09 pm**

by **MagicPlot**

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 912 times

### Re: R squared

Posted: **July 22nd, 2019, 3:36 pm**

by **Spacebat1**

OK, I think I understand now!

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

//d