How to obtain R square value
Afficher commentaires plus anciens
Hi all,
coefficientsold = polyfit(AAT,QErot1,1)
Ygg=polyval(coefficientsold,AAT)
figure
axis([-10 80 0 15])
plot(AAT,QErot1,'s',AAT,Ygg,'--','MarkerFaceColor',[0 0 0])
By using this code what I obtain is a linear equation that fits my data, but I am not able to obtain the R-square value.
I would be glad if you could tell be how to obtain the r-square value, if it is possible by the use of the regress function, because I am not able to understand the use of this function properly.
Thank you very much
Andoni
Réponse acceptée
Plus de réponses (1)
Kalpesh Patil
le 1 Sep 2014
0 votes
correlation_coeff = corr2(Ygg,AAT);
r_sqr = power(correlation_coeff,2);
4 commentaires
Andoni Mendialdua
le 1 Sep 2014
Andoni Mendialdua
le 1 Sep 2014
Iain
le 1 Sep 2014
Why do you think that an R-squared value of 1 is wrong?
Are you actually asking for an RMS?
Andoni Mendialdua
le 1 Sep 2014
Catégories
En savoir plus sur Descriptive Statistics dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!