[R] Fitting gamma and exponential Distributions with fitdist
Prof Brian Ripley
ripley at stats.ox.ac.uk
Thu Apr 28 08:41:14 CEST 2011
On Wed, 27 Apr 2011, Joshua Wiley wrote:
> I am not incredibly knowledgeable about gamma distributions, but
> looking at your data, you have a tiny mean:variance ratio, which, I
> believe, means that the bulk of the distribution will be near 0 and
> you may run into computational problems (again I think. I would
> gladly be corrected).
No, the data are well-fitted by an exponential of mean about 2000.
> This all makes me think it might be a
> convergence issue. Perhaps you can transform your data for estimation
> and then transform it back (not sure if this would yield equivalent
> fitdist(test + 10^4, "gamma")
> fitdist(test/10^4, "gamma")
Yes. This indeed a scaling issue: the estimated rate is very small.
> Good luck,
> On Wed, Apr 27, 2011 at 9:42 PM, vioravis <vioravis at gmail.com> wrote:
>> There was a small error in the data creation step and have fixed it as below:
>> test <- c(895.1358,2915.7447,335.5472,1470.4022,194.5461,1814.2328,
>> Any help would be appreciated. Thank you.
>> View this message in context: http://r.789695.n4.nabble.com/Fitting-gamma-and-exponential-Distributions-with-fitdist-tp3477391p3480133.html
>> Sent from the R help mailing list archive at Nabble.com.
>> R-help at r-project.org mailing list
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
> Joshua Wiley
> Ph.D. Student, Health Psychology
> University of California, Los Angeles
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help