Re: [R] Fitting Distributions Directly From a Histogram

From: Vincent Goulet <>
Date: Mon 19 Jun 2006 - 08:20:35 EST

Le Lundi 12 Juin 2006 06:51, Lorenzo Isella a écrit :
> Dear All,
> A simple question: packages like fitdistr should be ideal to analyze
> samples of data taken from a univariate distribution, but what if
> rather than the raw data of the observations you are given directly
> and only a histogram?

Let's assume that you have not only the histogram itself, but also the breaks and the counts per bin. Then you have what grouped data --- at least that's how we call those in Actuarial Science. Maximum likelyhood estimation is feasible for such data, but it is slightly more complicated. "Loss Models" by Klugman, Panjer & Willmot (Wiley) covers this.

I'm now thinking of adding this to my actuarial science package "actuar"...

> I was thinking about generating artificially a set of data
> corresponding to the counts binned in the histogram, but this sounds
> too cumbersome.
> Another question is the following: fitdistr provides the value of the
> log-likely hood function, but what if I want e.g. a chi square test to
> get some insight on the goodness of the fitting?

Goodness of fit tests for grouped data are also covered in Loss Models.

> I am sure there must be a way to get it straightforwardly without
> coding it myself.

Once you have the theory, I'm afraid for now you will have to code the estimation procedure yourself.


> Many thanks
> Lorenzo
> ______________________________________________
> mailing list
> PLEASE do read the posting guide!

  Vincent Goulet, Professeur agrégé
  École d'actuariat
  Université Laval, Québec

______________________________________________ mailing list
PLEASE do read the posting guide!
Received on Mon Jun 19 08:30:33 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Mon 19 Jun 2006 - 12:11:37 EST.

Mailing list information is available at Please read the posting guide before posting to the list.