I am trying to use mle() function in MATLAB to estimate the parameters of a 6-parameter custom distribution.
The PDF of the custom di
exp() is a function, not a variable, precise the argumentexp^(-c*w) ---> exp(-c*w)
6 parameters, not only one
0.1*ones(1,6)mle requires the upper bound of the integral to be a
scalar, I did some trial and error and the range is [2~9]. for the
trial some values lead to negative cdf or less than 1 discard them.I re-write all the functions, check them out
The code is as follow
Censored = ones(5,1);% All data could be trusted
data = rand(5,1); % Since I cannot upload the acutal data, we may use this
f = @(w,a,b,c) (w.^(a-1)).*((1-w).^(b-1)).*exp(-c.*w);
% to estimate the parameters
custpdf = @(t,alpha,theta,beta, a,b,c)...
(((integral(@(w)f(w,a,b,c), 0,1)).^-1).*...
beta.*...
((igamma(alpha, (theta./t).^beta)).^(a-1)).*...
((theta./t).^(alpha.*beta + 1 )).*...
exp(-(((theta./t).^beta)+...
c.*igamma(alpha, (theta./t).^beta)./gamma(alpha))))./...
(theta.*...
((gamma(alpha)).^(a+b-1)).*...
((gamma(alpha)-...
igamma(alpha, (theta./t).^beta)).^(1-b)));
custcdf = @(t,alpha,theta,beta, a,b,c)...
((integral(@(w)f(w,a,b,c), 0,1)).^-1).*...
(integral(@(w)f(w,a,b,c), 0,2));
phat = mle(data,'pdf',custpdf,'cdf',custcdf,'start', 0.1.*ones(1,6),'Censoring',Censored);
Result
phat = 0.1017 0.1223 0.1153 0.1493 -0.0377 0.0902