Maximum Likelihood Estimation function
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Jane Smith
el 12 de Mayo de 2022
Editada: David Randolph
el 13 de Mayo de 2022
syms a
logL=100.*log(a)+sum(log(exp(a.*c2))+sum(log((1+exp(a.*c2)).^-2)));
j = fplot(logL)
hold on
%%
m=100/a;
o=sum(c);
p=2*exp(a.*c);
q=exp(a.*c)+1;
dlog=m+o-p.*c.*(q.^-1);
k=fplot(dlog);
hline.Color = 'k';
c is a matrix of data
I am trying to find the maximum of the estimator is there another method except plotting the graphs of the log functions?
0 comentarios
Respuesta aceptada
Torsten
el 12 de Mayo de 2022
x = your data vector
fun = @(a) n/a + sum(x) - 2*a*sum(exp(a*x)./(exp(a*x)+1);
a = fzero(fun,1)
Más respuestas (1)
John D'Errico
el 12 de Mayo de 2022
Is there another way? Why not negate the function, and then use a tool like fminbnd? Or fminsearch. Or fmincon or fminunc, or ...
2 comentarios
David Randolph
el 13 de Mayo de 2022
Editada: David Randolph
el 13 de Mayo de 2022
@John D'Errico wrong again!
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!