How can I get the 95% confidence interval for the 3 parameters of a Weibull distribution?

27 vues (au cours des 30 derniers jours)
Hello everyone,
I am having problems with the mle function. I need to estimate the 3 parameters of a Weibull distribution for a set of data (aproximately 30 values), with the 95% confidence interval for the parameters.
As Matlab's built in Weibull pdf is defined for 2 parameters, I created a custom pdf which takes into account the 3rd scale parameter c, with the following code:
custpdf = @(x,a,b,c) (x>c).*(b/a).*(((x-c)/a).^(b-1)).*exp(-((x-c)/a).^b);
If I then use the mle function to estimate the three parameters, this line of code works fine and returns plausible values for the parameters:
opt = statset('MaxIter',1e5,'MaxFunEvals',1e5,'FunValCheck','off');
Weibull = mle(data,'pdf',custpdf,'start',[Wa_ini Wb_ini Wc_ini],'Options',opt,...
'LowerBound',[0 0 0],'UpperBound',[Inf Inf min(sigma_i)])
(data is the set of values I am evaluating, and [Wa_ini Wb_ini Wc_ini] are the values that should be taken as start values by the algorithm)
Now when I use the form of the mle function which also returns the 95% confidence interval (code below), Matlab still returns the correct values for the 3 parameters, but the lower and upper limits of the confidence interval are completely incoherent : for example for the parameter a=107.3528, the confidence interval is [-450.0639;+664.7696].
[Weibull, pci] = mle(sigma_i,'pdf',custpdf,'start',[Wa_ini Wb_ini Wc_ini],'Options',opt,...
'LowerBound',[0 0 0],'UpperBound',[Inf Inf min(sigma_i)])
Can anyone help me with this issue?
I am using Matlab2017a.
Thank you!
  2 commentaires
Ben M
Ben M le 2 Déc 2020
Hello,
i know your post is a few years old, but i am facing the same problem for myself. Have you been able to solve your problem concerning the confidence interval? If so, would you share your solution with me?
Many greetings
Anas Boukili Makhoukhi
Anas Boukili Makhoukhi le 4 Jan 2022
Hi there,
Have you been able to solve your problem concerning the confidence interval? If so, would you share your solution with me ?

Connectez-vous pour commenter.

Réponses (2)

laurent jalabert
laurent jalabert le 5 Jan 2022
Modifié(e) : laurent jalabert le 5 Jan 2022
Dear Anas, I am not specialist for this question. I found this function for Wiebull + 3 parameters
I thought that you can define this function and use non linear regression fit to get those 3 parameters. Personnaly, I started to use non linear regression fit for my research, it worked very well, and gave results very closed to Mathematica (you can also try it if you have).
Or you can try this :

laurent jalabert
laurent jalabert le 5 Jan 2022
I am not sure but : if you define the Weibull function and use the Non Linear Regression fit (fitnlm) in Statistics/Machine Learning, you will get the standard deviation on the fit parameters.
modelfun1 = @(a,x) a(1).*(1+a(2).*x(:,1)); --> replace by your function
beta1 are initial range of parameters, tbl is your data arranged in a table
mdl = fitnlm(tbl,modelfun1,beta1,'CoefficientNames',{'a1';'a2'});
  7 commentaires
Mohammed Benali
Mohammed Benali le 6 Jan 2022
Hi guys,
i‘m facing the exact same problem as mentioned by Louise above. If someone has a solution to estimate the confidence bounds for a 3p-weibull in matlab, please share your code. Thanks!
Jeff Miller
Jeff Miller le 6 Jan 2022
@Anas Boukili Makhoukhi I think c is estimated by the minimum rather than the mean of your dataset.

Connectez-vous pour commenter.

Community Treasure Hunt

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

Start Hunting!

Translated by