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!