Complete example of mle custom pdf w/o anonymous pdf please. HELP!

Among the many examples of mle with custom pdfs there are none without anonymous pdfs that have non-conflicting notation, Can someone please provide a complete example including the mle arguments? I keep getting error messages that are obviously wrong and give little clue as to what is actually wrong. The test of wpdf below works just fine. The mle crashes. HELP! Thank you.
%Initialize theta.
theta1 = 0.1;
theta2 = 0.5;
start = [theta1 theta2]
%QC test of pdf for prob. of observed pref. rank vector.
testlogprob = log(wpdf(theta1, theta2, data)) %Call the pdf.
pdfH = @wpdf; %Define pdf "function handle."
[phat,pci]= mle(dat,'pdf',@pdfH(theta1, theta2, data),'start',start)

回答 (1 件)

Andrew Newell
Andrew Newell 2014 年 4 月 28 日

0 投票

You're entering the pdfH argument incorrectly. Try this:
[phat,pci] = mle(dat,'pdf',pdfH,'start',start);

4 件のコメント

jeff bodington
jeff bodington 2014 年 4 月 30 日
I am still not getting it to work. A complete example including (1) the custom pdf as a function in a separate file (not an anonymous pdf) and (2) the complete mle statement would be useful. Matlab, unfortunately, does not have a complete example. Thank you.
Andrew Newell
Andrew Newell 2014 年 5 月 1 日
How exactly is it not working? You don't provide enough information for me to test it. Are the outputs of testlogprob and the call to mle supposed to be the same? Are dat and data different, or that just a misprint? Perhaps you could also provide a small data set so we can see what you're trying to do.
jeff bodington
jeff bodington 2014 年 5 月 1 日
Problem solved, thank you. I just and to start with a simple mle that worked and iterate to what I needed.
Andrew Newell
Andrew Newell 2014 年 5 月 2 日
Always a good approach.

サインインしてコメントする。

カテゴリ

ヘルプ センター および File Exchange で Simulink Real-Time についてさらに検索

質問済み:

2014 年 4 月 28 日

コメント済み:

2014 年 5 月 2 日

Community Treasure Hunt

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

Start Hunting!

Translated by