What optimization/search method is used in wblfit?
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);
endI 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 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 optimization weibull MATLAB Answers — New Questions