MATLAB Answers


How does matlab do maximum likelihood on custom functions?

Asked by sepideh
on 5 Jul 2012

I am trying to fit a custom function ( generalized Normal distribution type II my data and i am using mle function. I wonder what is the method that Matlab uses, is it a search method?


1 Answer

Answer by Peter Perkins
on 6 Jul 2012
 Accepted answer

Ordinarily, the mle function minimizes the negative log-likelihood that you have defined (either as a PDF, or a log PDF, or as the LL) using fminsearch. If you have the Optimization Toolbox, you can tell mle to use fmincon. This is the 'OptimFun' parameter, explained in the help for the mle function.


on 31 Aug 2012

Thanks, using mle i find this warning :Warning: Maximum likelihood estimation did not converge. Iteration limit exceeded. How much i can trust the answers and how can i change the number of iterations?

Peter Perkins
on 31 Aug 2012

Not at all if it didn't converge, and

>> help mle
 mle Maximum likelihood estimation.
       'options'      A structure created by a call to STATSET, containing
                      numerical options for the fitting algorithm.  Not
                      applicable to all distributions.

Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi test

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!