Re: [R] MLE Estimation of Gamma Distribution Parameters for data with 'zeros'

From: Ben Bolker <bolker_at_ufl.edu>
Date: Wed, 11 Jun 2008 20:58:06 +0000 (UTC)

Fox, Aaron <Afox <at> golder.com> writes:

>
> Greetings, all
>
> I am having difficulty getting the fitdistr() function to return without
> an error on my data. Specifically, what I'm trying to do is get a
> parameter estimation for fracture intensity data in a well / borehole.
> Lower bound is 0 (no fractures in the selected data interval), and upper
> bound is ~ 10 - 50, depending on what scale you are conducting the
> analysis on.
>

  You're right that the basic problem is with the gamma distribution. P(x,shape) dx = 0 (shape>1), 1 (shape=1), or Inf (shape<1). A quick cheat would be to add a small number (0.001?) to your data, try it again, and see how sensitive the estimate is to how small that number is. You could also try a negative binomial fit, which is the discrete analog of the gamma (and hence won't have any problem with zeros). People who do beta regressions with zero values in them often talk about adding a small Bayesian 'fudge factor' to deal with this problem ... (see http://psychology.anu.edu.au/people/smithson/details/betareg/Readme.pdf )

  Ben Bolker



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Wed 11 Jun 2008 - 21:42:50 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 11 Jun 2008 - 22:30:44 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive