Filter löschen
Filter löschen

How can I plot the the liklihood Function to show convergence to MLE

1 Ansicht (letzte 30 Tage)
How can I plot the my Liklihood function for a large n, say at 100, to show MLE convergence (inflection point)? fplot did not work. I used the iterative Newton method to solve via convergence to theta_MLE and would like to graphically display this as well. Thanks for any suggestions.
L_theta=1/16*((1+x1*theta)*(1+x2*theta)*(1+x3*theta)*(1+x4*theta))
fplot(L_theta,[-1,1])

Akzeptierte Antwort

Renee Coetsee
Renee Coetsee am 23 Mär. 2017
I believe that "fplot" did not work because it is expecting a function handle. Because I am unable to run the code that you provided, I am assuming "L_theta" is an array or scalar value.
Try turning "L_theta" into an anonymous function. Here is an example with input "theta":
L_theta = @(theta) 1/16*((1+x1*theta)*(1+x2*theta)*(1+x3*theta)*(1+x4*theta))
Refer to the documentation page for "fplot" for more function handle examples:

Weitere Antworten (0)

Kategorien

Mehr zu Just for fun finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by