What optimization/search method is used in wblfit?
조회 수: 4 (최근 30일)
이전 댓글 표시
I am writing an article about maximum likelihood methods. To understand Matlab methods better, I selected parameters Weibull a=250 and b=1.5 to simulate 50 life tests to failure (no censoring) with rng(1). The parameter estimate results of a=275 and b=1.355 using wblfit were close to the selected values. Contour and surface plots of the loglikelihood values around the parameter values shows a nearly flat surface around values of b = 1.4. What search method is used in wblfit to optimize the results? Is there a way to use least squares regression?
Here is an example of my code for uncensored data.
clc
clear
close all
rng(1)
a = 250;
b = 1.5;
x=wblrnd(a,b,50,1);
h1 = figure;
h2 = probplot('weibull',x);
set(h1,'WindowStyle','docked')
grid on;
box on
[paramhat,paramci] = wblfit(x,.9);
T = table(x);
%% create a mesh grid
x = 0.75:0.1:2;
y = 200:10:300;
[x,y]=meshgrid(x,y);
[r,c]= size(x);
M = zeros(r,c);
for j = 1:c
beta = x(1,j);
for i = 1:r
theta = y(i,1);
M(i,j)=fnLL(T,theta,beta);
end
end
h1=figure;
h2=contour(x,y,M);
set(h1,'WindowStyle','docked');
h1 = figure;
h2 = surf(x,y,M);
set(h1,'WindowStyle','docked');
function LL=fnLL(T,theta,beta)
T.f = wblpdf(T.x,theta,beta);
T.L=log(T.f);
LL = sum(T.L);
end
댓글 수: 0
답변 (1개)
arushi
2024년 9월 10일
Hi Dennis,
The wblfit function in MATLAB likely uses a gradient-based optimization method such as the Newton-Raphson method or Quasi-Newton methods for Maximum Likelihood Estimation (MLE), although the exact method isn't specified in the documentation.
Regarding using Least Squares Regression for estimating Weibull parameters, it's generally not recommended because Least Squares does not consider the distributional nature of the data. MLE is preferred for distribution fitting due to its statistical properties.
For educational or comparative purposes, you could theoretically apply Least Squares by linearizing the Weibull cumulative distribution function (CDF) and using linear regression, but this approach is less accurate and statistically sound compared to MLE for distribution fitting.
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!