Correlation coefficient for robust fit and regress fitting are they equal?
Afficher commentaires plus anciens
I have done regression analysis for the x and Y using two cases. For the first regression I used 'regress' and for the second case 'robustfit'. How can I get the correlation coefficient of the two? shouldn't they be different? here is the script I tried to work upon..
figure (1)
[a,b]= robustfit(x,y);
plot(x,a(1)+a(2).*x,'g');
figure (2)
[a1, b1]=regress(y, [ones(size(x)) x]) ;
plot(x,a1(1)+a1(2).* x,'r','LineWidth',2);
Thanks for your help
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Multiple Linear Regression 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!