MATLAB Answers

0

Robust regression

Asked by fcarl on 29 Jun 2011
Hi,
I want to do robfit() but I want to fit an exponential function. Is there any option for robfit to do this?
Thanks for your efforts!

  0 Comments

Sign in to comment.

3 Answers

Answer by the cyclist
on 29 Jun 2011

A scan of the documentation for the robustfit() function suggests to me that that is not a default option, but that you could specify WFUN as your own exponential function.

  0 Comments

Sign in to comment.


Answer by fcarl on 30 Jun 2011

I think WFUN is the weighting function for the "penalization" of the residuals!? Or am I wrong?

  0 Comments

Sign in to comment.


Answer by the cyclist
on 30 Jun 2011

You can do a robust fit to an exponential function by using the nlinfit() function with the 'Robust' option set to 'on'. (You can set the weight function with the 'WgtFun' parameter.)
[Sorry for my other, wildly inaccurate, answer. You might want to change your "Answer" to a comment on my other answer. It will be less confusing to future readers.]

  0 Comments

Sign in to comment.