goodness of fit: Least absolute deviation

Hi,
I would like to know how matlab calculate sse, rmse and Rsquare when we used the options "Robust",'LAR' in fitoptions since the result I obtained is different from the traditional sse, rmse and Rsquare results.
Thanks
Elisabeth

 Accepted Answer

Tom Lane
Tom Lane on 6 Apr 2012
The function computes a robust estimate of the error standard deviation and calls this rmse. The sse is then dfe*rmse^2 where dfe is the degrees of freedom for the error term. Rsquare is 1-sse/sst.
A reference for the robust estimate of the error standard deviation is DuMouchel, W.H., and F.L. O'Brien (1989), "Integrating a robust option into a multiple regression computing environment," Computer Science and Statistics: Proceedings of the 21st Symposium on the Interface, American Statistical Association.

5 Comments

Thank's for your answer Tom.
Is it possible to have the way to compute those statistics as I couldn't find the reference on the internet.
Thanks
PS. here is my code to do the Robust fit weights:
s=fitoptions('Method','NonlinearLeastSquares','Algorithm','Levenberg-Marquardt','Weights',weights,'Robust','LAR','StartPoint',[308.56 2],'MaxFunEvals',10000,'MaxIter',4000);
g=fittype ('R10*exp(E0*((1/56.02)-(1/(x+46.02))))','options',s);
[g,gof,out]=fit(x,y,g);
Can anyone tell me the significance of MaxFunEvals and MaxIter because, I increased these numbers to very high values but still after I evaluated my coefficients using Lavenberg Marquardt, I still got a better result after doing some manipulation after getting it out from matlab.Can anyone suggest the argument (MaxFunEvals,etc) values that should be given to get the highest accuracy?
MaxFunEvals and MaxIter onyl halt the optimization when the maximum number of function evaluations or iterations are reached (when they bind)... if they were not reached when getting the solution, then increasing their numbers is not gonna improve accuracy.
i dont know which solver you use, but for most you can try smaller numbers for 'TolX', 'TolFun' instead (and 'TolCon' if applicable). This should improve accuracy...
(scaling your variables can also help)
Jérôme, I may not quite understand. The function computes the rmse for you. The other statistics follow from the formulas I gave. If you want to see the code, look at the file private/statrobustsigma. If you need some information other than the code, send me e-mail.
Hi Tom,
Would it be possible to share the algorithm for this LAR or minimum absolute deviations?
Thanks,
Hannah

Sign in to comment.

More Answers (0)

Categories

Community Treasure Hunt

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

Start Hunting!