Modifying the Parameter Estimation Method of wblfit Function
조회 수: 4 (최근 30일)
이전 댓글 표시
By default, the wblfit function returns the 'maximum likelihood estimate' as describied below:
parmhat = wblfit(data) returns the maximum likelihood estimates , parmhat, of the parameters of the Weibull distribution given the values in the vector data, which must be positive. parmhat is a two-element row vector: parmhat(1) estimates the Weibull parameter a, and parmhat(2) estimates the Weibull parameter b, in the pdf.
How can I change the parameter estimation method from maximum likelihood estimate to rank regression method of the least square curve fit? I've spent 2 days trying to figure this out and have had no luck. The 'rank regression method' is very common when it comes to weibull analysis on small sample sizes. Any help would be greatly appreciated.
댓글 수: 0
답변 (2개)
Tom Lane
2015년 4월 4일
I think you should not modify wblfit, but just do it directly or write a separate function. Here's an example of how to do what I think you want:
% Random sample with paramaters 1000 and 1.3
n = 1000;
x = wblrnd(1000,1.3,n,1);
% Fit by maximum likelihood
p = wblfit(x)
% Create probability plot on log scale
z = wblinv(((1:n)-.5)/n,1,1)'; % idealized sample from standard Weibull
plot(log(z),sort(log(x)),'bx')
% Fit points on plot by least squares
b = polyfit(log(z),sort(log(x)),1)
line(log(z),b(1)*log(z)+b(2),'LineStyle',':')
% Transform to Weibull parameter scale
p1 = 1/b(1)
p2 = exp(b(2))
Dutchie
2016년 11월 1일
Solution, is the calculation of the Z-variable.
z = wblinv(((1:n)-.3)/(n+0.4),1,1)'
results are correct.. as per the source.
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!