How can I compute coefficient of determination(R^2) of robust regresstion?
2 views (last 30 days)
Show older comments
x=[1,2,3,4,5,6,7,8,9,10];
y=[1.1,2.1,13.1,4.3,5.4,5.8,6.9,7.8,16,10.1];
[b,stat]=robustfit(x,y,'bisquare');
sse=stat.dfe*stat.robust_s^2;
phat = b(1) + b(2)*x;
ssr = norm(phat-mean(y))^2; % ssr = norm(phat-mean(phat))^2; are also tested
R^2=1-sse/ssr

but sse and ssr are not same to the results of cftool ,nor the R^2.
thak you for your help
0 Comments
Answers (0)
See Also
Categories
Find more on Mathematics and Optimization in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!