Parameters for Frechet Distribution
11 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
回答(1 个)
Jeff Miller
2019-9-27
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 个评论
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
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!