Complete example of mle custom pdf w/o anonymous pdf please. HELP!
Mostrar comentarios más antiguos
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)
Respuestas (1)
Andrew Newell
el 28 de Abr. de 2014
You're entering the pdfH argument incorrectly. Try this:
[phat,pci] = mle(dat,'pdf',pdfH,'start',start);
4 comentarios
jeff bodington
el 30 de Abr. de 2014
Andrew Newell
el 1 de Mayo de 2014
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
el 1 de Mayo de 2014
Andrew Newell
el 2 de Mayo de 2014
Always a good approach.
Categorías
Más información sobre Creating and Concatenating Matrices en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!