Trucated Weibull distribution - parameter estimation?

조회 수: 8 (최근 30일)
Hobble Wobb
Hobble Wobb 2021년 1월 26일
댓글: Hobble Wobb 2021년 1월 27일
In order to fit a statistical distribution to a truncated set of data, MATLAB provides examples for poisson and normal distribution (see hyperlink_fitting_distributions).
Those work indeed fine, yet has fitting a truncated Weibull distribution proven to be trickier.
The numerical solution does not seem to converge, one gets either an error or the estimated parameters are simply the bounds provided by the user...
How does one fit a truncated Weibull distribution?
A minimum (not) working example with parameters bounded:
n= 150; % number of random points
a_0 = 0.045; % scaling parameter
b_0 = 0.8; % shape paramter - chosen random, but < 1
x = wblrnd(lambda,nu,n,1); % generate random data
x_trunc = 0.02; % truncation point
x = x(x > x_trunc); % truncate data
pdf_truncnorm = @(x,a,b) wblpdf(x,a,b)./(1-wblcdf(x,a,b)); % failure rate function for maximum likelihood
[paramest,paramCIs] = mle(x,'pdf',pdf_truncnorm,'start',[0.02,0.6],'LowerBound',[0 0],'UpperBound',[0.05 1]); % maximum likelihood estimation
% Error or wrong estimated parameters
The failure rate function tends to infinity for x approaching the truncation point - but this doesn't seem to be the issue.
Examples of fitted truncated Weibull distributions can be found in literature (e.g. see paper here) - what am I doing wrong?
Any help would be greatly appreciated!
  댓글 수: 3
Jeff Miller
Jeff Miller 2021년 1월 26일
in the pdf_truncnorm line, shouldn't that be 1-wblcdf(x_trunc,a,b)?
Hobble Wobb
Hobble Wobb 2021년 1월 27일
Hello Jeff Miller,
thank you for your really quick reply! And thanks for the correction regarding x_trunc - of course you were right! I should have double checked that. Now it works perfectly fine.
I'm sorry about 'lambda' and 'nu', I changed nomenclature of the original script to comply with MATLAB nomenclature, but forgot about wblrnd.
For everyone reading this post later - corrected version:
n= 150; % number of random points
a_0 = 0.045; % scaling parameter
b_0 = 0.8; % shape paramter - chosen random, but < 1
x = wblrnd(a_0,b_0,n,1); % generate random data
x_trunc = 0.02; % truncation point
x = x(x > x_trunc); % truncate data
pdf_truncnorm = @(x,a,b) wblpdf(x,a,b)./(1-wblcdf(x_trunc,a,b)); % failure rate function for maximum likelihood
[paramest,paramCIs] = mle(x,'pdf',pdf_truncnorm,'start',[0.02,0.6],'LowerBound',[0 0]); % maximum likelihood estimation

댓글을 달려면 로그인하십시오.

답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by