[R] Fiting of gamma distribution

Ben Bolker bolker at ufl.edu
Thu Oct 11 19:52:21 CEST 2007




Dr. Abhey Ram Bansal wrote:
> 
> Hi,
> Could any one help me finding specific codes for fitting gamma
> distribution
> to the  the  data in log scale? thanks for the help.
> cheers!
> yours sincerely
> Abhey Ram Bansal
> 

Does 

library(MASS)
fitdistr(log(x),"gamma")

work for you?

You'll need to make sure that all of your data values are > 1,
otherwise the logged data will have values <0 and fitdistr
will barf.

  cheers
   Ben Bolker


-- 
View this message in context: http://www.nabble.com/Fiting-of-gamma-distribution-tf4607804.html#a13161140
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list