Warning: Maximum likelihood estimation did not converge. Function evaluation limit exceeded.
이전 댓글 표시
I get the warning: Warning: Maximum likelihood estimation did not converge. Function evaluation limit exceeded.
Which relationship does
opt = statset('MaxIter',1e5,'MaxFunEvals',1e5,'FunValCheck','on');
have to my code? Especially the part: 'MaxIter',1e5,'MaxFunEvals',1e5. Because thats why the warning displays I think.
(I tried to understand in the documentary, I didnt understand. Maybe also because of my english).
The number of warnings changes everytime I change the parameter. Like when I change n or b_A or T_A.
PS: I am estimating a 2 and 3 parameter weibul distribution. I excluded the 2parameter version, for better overview. If you see somethin is not right with my code, I am thankful for every advice :)
clear all;
n = 100;
t0 = 0.2;
b_A = 1:5;
T_A = 1:5;
LowerBound= [0 0 0];
rng('shuffle');
data3p = zeros(n,length(b_A),length(T_A));
params3p = zeros(length(b_A),length(T_A));
Ergebnis3p = double.empty(length(b_A)*length(T_A), 0);
for k= T_A
for i= b_A
data3p(:,i,k) = wblrnd(i,k, [n,1]) + t0;
start = [i k t0];
custompdf = @(x,a,b,c) (x>c).*(b/a).*(((x-c)/a).^(b-1)).*exp(-((x-c)/a).^b);
opt = statset('MaxIter',1e5,'MaxFunEvals',1e5,'FunValCheck','on');
params3p(i,1:3,k) = mle(data3p(:,i,k),'pdf',custompdf,'start',start,'Options',opt,'LowerBound',LowerBound,'UpperBound',[Inf Inf min(data3p(:,i,k))])
params3p(i,4,k) = i;
params3p(i,5,k) = k;
params3p(i,6,k) = t0;
end
Ergebnis3p((k-1)*length(b_A)+1:k*length(b_A), 1:size(params3p, 2)) = params3p(:,:,k);
end
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Weibull Distribution에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!