Parameters for Frechet Distribution
이전 댓글 표시
How do i find parameters for two parameter Frechet distribution (shape & scale) using maximum likelihood method?
alpha is shape & beta is scale in the formula
답변 (1개)
Jeff Miller
2019년 9월 27일
0 개 추천
You could write a function to compute -log(likelihood of your data) from alpha & beta, then use fminsearch to find the alpha,beta pair minimizing that function (i.e., maximize likelihood).
In case you want to do that, note that your formulas are wrong (I am pretty sure). In all three places where you have "\beta / x", it should be "x / \beta" instead.
댓글 수: 2
Nikhilesh Gandhre
2019년 9월 27일
편집: Nikhilesh Gandhre
2019년 9월 27일
Jeff Miller
2019년 9월 27일
At the end of section 6.2, that pdf file seems to show how to get the MLEs directly (by solving eqns 6.2.4, 6.2.6 and 6.2.13).
But if you want to use fminsearch, the code would look something like this (unchecked):
function [estA, estB] = MLE_est(x,guess)
% x is the vector of data points
% guess is a vector with 2 elements; these are your initial guesses for A and B
ests = fminsearch(@fntominimize,guess);
estA = ests(1);
estB = ests(2);
function minuslnpdf = fntominimize(ests) % use a nested function so it has access to x
estA = ests(1);
estB = ests(2);
% Next compute the pdf values of all x's
pdfs = (estA/estB)*(estB./x).^(estA+1) .* exp( -(estB./x).^estA );
% now compute the minus of the log likelihood function, which is what
% you want to minimize.
minuslnpdf = sum( -log(pdfs) );
end
end
카테고리
도움말 센터 및 File Exchange에서 Uniform Distribution (Continuous)에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!