search for: gammaloglik

Displaying 2 results from an estimated 2 matches for "gammaloglik".

2008 Jun 11
2
MLE Estimation of Gamma Distribution Parameters for data with 'zeros'
...back in 2003 from the archives of this mailing list: R code ######################################## gamma.param1 <- shape.mom gamma.param2 <- scale.mom log.gamma.param1 <- log(gamma.param1) log.gamma.param2 <- log(gamma.param2) gammaLoglik <- function(params, negative=TRUE){ lglk <- sum(dgamma(data, shape=exp(params[1]), scale=exp(params[2]), log=TRUE)) if(negative) return(-lglk) else return(lglk) } optim.list <- optim(c(log.gamma.param1, log.gamma.param2), gammaLoglik) gamma.param1 <- exp(optim.lis...
2003 Sep 30
3
fitdistr, mle's and gamma distribution
Dear R Users, I am trying to obtain a best-fit analytic distribution for a dataset with 11535459 entries. The data range in value from 1 to 300000000. I use: fitdistr(data, "gamma") to obtain mle's for the parameters. I get the following error: Error in optim(start, mylogfn, x = x, hessian = TRUE, ...) : non-finite finite-difference value [1] And the following warnings: