On 08/06/2011 09:23 PM, Jorge Ivan Velez wrote:
Hi Alex,

Try

require(MASS)
Loading required package: MASS
b<- c(2039L, 2088L, 5966L, 2353L, 1966L, 2312L, 3305L, 2013L, 3376L,
+ 3363L, 3567L, 4798L, 2032L, 1699L, 3001L, 2329L, 3944L, 2568L,
+ 1699L, 4545L)
fitdistr(b, 'gamma')
       shape           rate
   6.4528939045   0.0021887943
  (0.7722567310) (0.0001854559)


Hi,

I'm getting a weird error here, pasted below. Do you know what could cause that?

> fitdistr(b,"gamma")
Error in optim(x = c(2039L, 957L, 2088L, 5966L, 2307L, 2044L, 2353L, 1966L, :
  non-finite finite-difference value [2]
In addition: Warning message:
In dgamma(x, shape, scale, log) : NaNs produced

______________________________________________
R-help@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.

Reply via email to