mle with cdf

14 visualizzazioni (ultimi 30 giorni)
Peon Pion
Peon Pion il 11 Ott 2011
Commentato: junsoo lee il 28 Mag 2016
Hi
I was wondering if someone can shed light on mle with cdf. It always returns two estimates, regardless of of how many parameters you have. Moreover,the second estimate is the std of the input. e.g. If you run the following:
r = randn(100,1)*20+10;
pdf_norm = @(x,mu) = normpdf(x,mu,20);
cdf_norm = @(x,mu) = normcdf(x,mu,20);
[p1,c1]=mle(r,'pdf',pdf_norm,'start',5);p1
[p2,c2]=mle(r,'cdf',cdf_norm);p2
you see that p2 has two elements, when it should have only 1. What is the correct way of using mle with cdf if you do NOT have a pdf? How do you use mle with cdf if you have to estimate more than one parameter?
Thanks,

Risposta accettata

Peter Perkins
Peter Perkins il 12 Ott 2011
This
[p2,c2]=mle(r,'cdf',cdf_norm);
is not a valid syntax for the MLE function (for two reasons, but I'll assume you left out 'start' by accident). The help is perhaps not clear enough about this, but if you do not specify one of the two dozen or so "canned" distributions, then you MUST pass in either the PDF, or the log PDF, or the negative log-likelihood. The above syntax, without the 'pdf' input, is not ever shown in the help (if it is, please let us know where, it's a documentation bug).
It turns out that because you didn't provide 'pdf', or 'logpdf', or 'nloglf', MLE assumes you must want one of the "canned" distributions, and because you didn't specify one, it assumes 'normal'. You 'cdf' input is ignored.
So, you cannot use MLE if you do not have a PDF -- it does not auto-differentiate the CDF. If you absolutely cannot compute the PDF, you might take a look at the Fitting a Univariate Distribution Using Cumulative Probabilities demo that ships with the Statistics Toolbox.
  1 Commento
junsoo lee
junsoo lee il 28 Mag 2016
Hey,now I have this same question,could you tell me how to solve this question?Please!!!
beta=mle(s,'cdf',@(s,beta)Bro(s,beta),'start',1)
>>beta =
1.0016 0.5510

Accedi per commentare.

Più risposte (1)

junsoo lee
junsoo lee il 28 Mag 2016
ppppppplease tell me how did you solve this question

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by