Hi! I was wondering how to compute in Matlab the log likelihood. I think which the "fitdist" function includes "likelihood" function(e.g. normlike, gamlike and wbllike, etc). However, the result of likelihood value is not same result which I was using "Weilbull" distribution. The "Weibull" and "fitdist(data,'weibull') -> PD.NLogL" were not same value.
John Williams answered .
2025-11-20
>> x = -5*log(rand(100,1)); >> pd = fitdist(x,'weibull'); >> format compact >> negloglik(pd) ans = 267.1545 >> sum(-log(pdf(pd,x))) ans = 267.1545 >> wbllike(pd.ParameterValues,x) ans = 267.1545