mle with cdf

2 次查看(过去 30 天)
Peon Pion
Peon Pion 2011-10-11
评论: junsoo lee 2016-5-28
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,

采纳的回答

Peter Perkins
Peter Perkins 2011-10-12
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 个评论
junsoo lee
junsoo lee 2016-5-28
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

请先登录,再进行评论。

更多回答(1 个)

junsoo lee
junsoo lee 2016-5-28
ppppppplease tell me how did you solve this question

标签

Community Treasure Hunt

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

Start Hunting!

Translated by