Weibull fit to interval censored data
3 views (last 30 days)
Show older comments
I am trying to get the best weibull fit to some interval censored data. I know that wblfit function can handle right censored data, but it cannot handle interval censored data. Any help would be appreciated.
0 Comments
Answers (1)
Jeff Miller
on 12 Dec 2019
% Generate some truncated Weibull data just to have an example
% of some data to fit:
SampleSize = 1000;
TrueOffset = 0;
TrueScale = 1.3;
TrueShape = 1.2;
x = wblrnd(TrueScale,TrueShape,SampleSize,1) + TrueOffset;
% Here are the truncation limits & truncated data.
LowerLim = 0.5;
UpperLim = 4;
xt = x(x>LowerLim & x<UpperLim);
% Set up a doubly-truncated Weibull in Cupid:
GuessOffset = 0;
GuessScale = 1.4;
GuessShape = 1.1;
w = Weibull(GuessScale,GuessShape,GuessOffset);
tw = TruncatedX(w,LowerLim,UpperLim);
% The next line will use xt to compute maximum likelihood estimates of the
% three Weibull parameters scale, shape, and offset
tw.EstML(xt,'rrrff') % The optional string 'rrrff' indicates that the first 3 parameters are
% free to vary as reals, and the last 2 parameters are fixed.
% The first 3 parameters are those of the Weibull, and the last two
% parameters are the lower/upper limits
% If you want to fix the offset, just change the third r to an f like this:
tw.EstML(xt,'rrfff')
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!