I have a relatively small dataset (160 observations), of which a very large number of values for response variables are zero or very small (e.g., 114/160 values are 0; range 0-4250, with only 11 values >200). Other response variables are similar but are not integers (e.g., diversity calculations). There are 7 total response variables.

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. The GLMM would incorporate 4 predictor variables for each response: season and category as fixed, site and position w/i site (nested) as random.

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") 
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)

I have also tried a method I read about in which the data is split into 2 datasets: one of presence-absence data to be analyzed using logistic regression, another with the data for only non-zero samples, to be analyzed using ordinary regression (or, I have presumed, other analyses). However, even after considering only the non-zero data, the high number of small values makes finding an appropriate distribution difficult.

Any suggestions for what is causing the error code, if these potential distributions make sense, or if there are other analyses that may be useful?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.