What optimization/search method is used in wblfit?

4 Ansichten (letzte 30 Tage)
Dennis Craggs
Dennis Craggs am 31 Okt. 2021
Beantwortet: arushi am 10 Sep. 2024
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

Antworten (1)

arushi
arushi am 10 Sep. 2024
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.

Community Treasure Hunt

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

Start Hunting!

Translated by