How to get the R (not R^2) from a linear regression 'poly1'?

3 vues (au cours des 30 derniers jours)
Cheng Zhang
Cheng Zhang le 7 Nov 2021
Modifié(e) : the cyclist le 8 Nov 2021
When I use
[f,gof,output] = fit(x,y,'poly1')
I can get
gof =
struct with fields:
sse: 0.3126
rsquare: 0.9843
dfe: 1
adjrsquare: 0.9686
rmse: 0.5591
Is that possible to get the coefficient r as well, not the square of coefficient?

Réponse acceptée

the cyclist
the cyclist le 8 Nov 2021
Modifié(e) : the cyclist le 8 Nov 2021
Assuming you just want the correlation coefficient of the data, you don't need the model:
corrcoef(x,y)

Plus de réponses (0)

Catégories

En savoir plus sur Linear and Nonlinear Regression dans Help Center et File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by