Skip to content

Poisson Distribution fitting

5 messages · Mark Miller, Brian Ripley, Sean Davis

#
I am trying to fit a number of distributions to a set of data, I have used the 
fitdristr() funtion for most of the distributions, but Poisson is not one of 
the possible distributions. I found somewhee talking about using the gamlss 
package, but have been unable to find it again, any help would be greatly 
appreciated. 

Mark Miller
#
On Thu, 25 Aug 2005, Mark Miller wrote:

            
If you mean fitdistr in package MASS, it can be used.  But the mle for a 
Poisson is just the sample mean.
[1] 2.62
lambda
   2.6203125
  (0.1023841)

You can even find the s.e. via mu/sqrt(n), here
[1] 0.1657033
#
On Thu, 25 Aug 2005, Prof Brian Ripley wrote:

            
Sorry, sqrt(mu/n).
#
I was wandering if anyone cold advise me on a good algorithm to turn a set of 
data from its original for into its cumulative form.  I have written a piece 
of code that takes the data and does essentially what a histogram function 
would do, except add to the new bin the sum in the previous bin.  Once that 
is done I divide by the frequency in the last bin plus 1.  I know the ecdf() 
function exists in R, but I want to use it to fit the cumulative 
distributions to the data and ecdf() produces a non-subscriptable vector and 
so fitdistr() cannot be used on it.

Thanks for any help you can give
Mark Miller
#
Will ?cumsum help?

Sean
On 8/26/05 5:15 AM, "Mark Miller" <mmiller at nassp.uct.ac.za> wrote: