Code covered by the BSD License  

Highlights from
MOtion DEcision (MODE) model

image thumbnail
from MOtion DEcision (MODE) model by Massimiliano Versace
MOtion DEcision (MODE) model is a neural model of perceptual decision-making.

weib_mle.html

weib_mle.m


% weib_mle :: Function that defines the log-likelihood of the cumulative
% Weibull distribution function
%
%% Reference
% Myung, I. J. (2003). Tutorial on maximum likelihood estimation. Journal of Mathematical Psychology, 47, 90-100.
%
%% Author
% Myung (2003)
%%
function loglik=weib_mle(w_ml)
% WEIB MLE The log-likelihood function of the Weibull function

global n_ml t_ml x_ml;

w_ml(1,1)=w_ml(1,1)+eps;

p_ml=1-0.5*exp(-(t_ml/w_ml(1,1)).^w_ml(2,1));% Weibull function prediction given parameters
p_ml=p_ml+(p_ml==0)*1e-5-(p_ml==1)*1e-5; % ensure 0

Contact us at files@mathworks.com