Hello, I'm trying to use fitdistr() from the MASS package to fit a gamma  
distribution to a set of data. The data set is too large (1167 values) to  
reproduce in an email, but the summary statistics are:

Min. 1st Qu. Median Mean 3rd Qu. Max.
116.7 266.7 666.7 1348.0 1642.0 16720.0

The call I'm trying to make is:
fitdistr(x,"gamma")

and the error is:
Error in optim(x = c(3466.676842, 1666.749002, 2500.067852, 1200.053892, :
non-finite finite-difference value [2]
In addition: Warning message:
In dgamma(x, shape, scale, log) : NaNs produced

I found a couple of other posts from folks who were getting the same error  
from optim(), but did not find any useful tips for my situation. The error  
seems to indicate a problem with value 2 in my data set (1666.749002), but  
nothing seems odd about that value.

I'm willing to pass along the full data set as an attachment if it would  
help.

Thank you in advance!

Jason S. Augustyn, Ph.D.

	[[alternative HTML version deleted]]

