Effacer les filtres
Effacer les filtres

What optimization/search method is used in wblfit?

1 vue (au cours des 30 derniers jours)
Dennis Craggs
Dennis Craggs le 31 Oct 2021
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

Réponses (1)

Yash Sharma
Yash Sharma le 27 Mai 2024
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.

Catégories

En savoir plus sur Linear and Nonlinear Regression dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by