Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Calculating the log-likelihood value produced at dfittool

Subject: Calculating the log-likelihood value produced at dfittool

From: Berk

Date: 24 Jun, 2011 17:46:05

Message: 1 of 2

Hi,

I am using the dfittool to fit a 1-dimensional data into a statistical distribution (e.g. Poisson) and each distribution produces a log-likelihood result, which as I understood is a direct indicator of the goodness-of-fit (the higher the log-likehood value the better).

My question is, how to calculate that log-likehood value shown at dfittool at a m-file? I found this thread, http://www.mathworks.cn/matlabcentral/newsreader/view_thread/307588#836278, however dfittool produces a different log-likelihood value?

Kind Regards,
Berk

Subject: Calculating the log-likelihood value produced at dfittool

From: Tom Lane

Date: 1 Jul, 2011 17:30:19

Message: 2 of 2

> I am using the dfittool to fit a 1-dimensional data into a statistical
> distribution (e.g. Poisson) and each distribution produces a
> log-likelihood result, which as I understood is a direct indicator of the
> goodness-of-fit (the higher the log-likehood value the better).
> My question is, how to calculate that log-likehood value shown at dfittool
> at a m-file? I found this thread,
> http://www.mathworks.cn/matlabcentral/newsreader/view_thread/307588#836278,
> however dfittool produces a different log-likelihood value?

Berk, I just generated some x data and fit the Poisson distribution in
dfittool. The estimated parameter was 5.27, and in the fit display I saw:

   Log likelihood: -211.283

Here's how I reproduce that:

>> sum(log(poisspdf(x,5.27)))
ans =
 -211.2826

-- Tom

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us