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

25 ビュー (過去 30 日間)
Louise Carton
Louise Carton 2018 年 1 月 10 日
コメント済み: Jeff Miller 2022 年 1 月 6 日
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 件のコメント
Ben M
Ben M 2020 年 12 月 2 日
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 2022 年 1 月 4 日
Hi there,
Have you been able to solve your problem concerning the confidence interval? If so, would you share your solution with me ?

サインインしてコメントする。

回答 (2 件)

laurent jalabert
laurent jalabert 2022 年 1 月 5 日
編集済み: laurent jalabert 2022 年 1 月 5 日
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 2022 年 1 月 5 日
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 件のコメント
Mohammed Benali
Mohammed Benali 2022 年 1 月 6 日
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 2022 年 1 月 6 日
@Anas Boukili Makhoukhi I think c is estimated by the minimum rather than the mean of your dataset.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeExploration and Visualization についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by