How can I plot the the liklihood Function to show convergence to MLE
1 次查看(过去 30 天)
显示 更早的评论
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])
0 个评论
采纳的回答
Renee Coetsee
2017-3-23
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:
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!