Products

1 Answer

You ask a number of questions. Here are two answers. You ask how to compute the negative log likelihood. If you have the Statistics Toolbox and you are fitting a probability distribution, here's how to compute the negative log likelihood for the Poisson distribution. Note that it is smaller (likelihood is larger) at the mle than at a different value.

You ask about a zero truncated distribution. Here I define a Poisson distribution truncated to exclude the zero value. Then I use the mle function to fit this to the same sample as above but with zero excluded.

Hi Tom,
Much thanks for your promptness. However, I would like to seek few clarifications.
1. In trying to generate random poisson numbers, what is the meaning of 3 and 1 in poissrnd(3, 1000,1). I suppose 1000 means resampling 1000 times.
2. Since I already have my data, do I need to generate random number again?
3. in the equation, negloglik = -sum(log(poisspdf(x,m+.1))) why is the .1 added to m?

4. Can you please work on the other issues Gamma and Lognormal for me.