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

1 回表示 (過去 30 日間)
AR
AR 2017 年 3 月 21 日
コメント済み: AR 2017 年 3 月 24 日
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])

採用された回答

Renee Coetsee
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:
  1 件のコメント
AR
AR 2017 年 3 月 24 日
Renee, Worked perfect! Thank you, Allen

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

その他の回答 (0 件)

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by