0

I have a relatively small dataset (160 observations), of which a very large number of my response variables are zero or very small (e.g., 131/160 values are 0; range 0-1.56). I had originally planned to use GLMM and select an appropriate distribution, but have not been able to find one that is a good fit. I've tried gamma, log-normal, Weibull, and beta.

I would like to try (and had recommended to me) Poisson and negative binomial, and also zero-inflated Poisson, but when I try to see how these fit using fitdist (in fitdistr) I get the following error message:

fitpois <- fitdist(variable_scaled, "pois")

simpleError in optim(par = vstart, fn = fnobj, fix.arg = fix.arg, obs = data, gr = gradient, ddistnam = ddistname, hessian = TRUE, method = meth, lower = lower, upper = upper, ...): initial value in 'vmmin' is not finite> Error in fitdist(variable_scaled, "pois") : the function mle failed to estimate the parameters, with the error code 100

I have tried scaling the data to avoid having values of exactly zero in the data using:

variable_scaled <- (variable-min(variable)+0.001)/(max(variable)-min(variable)+0.002)

Any suggestions for what is causing the error code?

Thank you so much!

psychOle
  • 1,054
  • 9
  • 19
Mako
  • 1
  • Poisson and negative binomial are for integer valued responses. If your range is 0-1.56 that would imply some sort of continuous measure. – Dason Feb 26 '19 at 18:18
  • You seem to be looking for zero inflated models. See [CrossValidated](https://stats.stackexchange.com/questions/279273/zero-inflated-distributions-what-are-they-really), [here](https://en.wikipedia.org/wiki/Zero-inflated_model) and [here](https://stats.idre.ucla.edu/r/dae/zip/). A CRAN package for these models is package [pscl](https://cran.r-project.org/web/packages/pscl/index.html). – Rui Barradas Feb 26 '19 at 18:25

0 Answers0