Info

この質問は閉じられています。 編集または回答するには再度開いてください。

How can I maximize the range of included data to built my robust regression model?

1 回表示 (過去 30 日間)
Riyadh Muttaleb
Riyadh Muttaleb 2017 年 9 月 13 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
I would like to use "robustfit" function with including maximum points that I have in the regression,
[b,stats] = robustfit(X,y,wfun,tune,const)
the example below is from matlab help:
x = (1:10)';
rng default; % For reproducibility
y = 10 - 2*x + randn(10,1);
y(10) = 0;
bls = regress(y,[ones(10,1) x])
[brob,stats] = robustfit(x,y,'andrews',1.339,'on')
ac=sum(stats.resid)
scatter(x,y,'filled'); grid on; hold on
plot(x,bls(1)+bls(2)*x,'r','LineWidth',2);
plot(x,brob(1)+brob(2)*x,'g','LineWidth',2)
legend('Data','Ordinary Least Squares','Robust Regression')
Thanks in advance for your cooperation
Riyadh

回答 (0 件)

この質問は閉じられています。

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by