Weibull fit to interval censored data
4 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
Jeff Miller
2019-12-12
% 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 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!