Error when running GLM - Inverse Gaussian Distribution

Given this precipitation data from two different sources, I am interested in trying a Generalized Linear Model using the Inverse Gaussian Distribution.

When I attempt to run it, Exploratory returns this error message:
positive values only are allowed for the 'inverse.gaussian' family the condition has length > 1 and only the first element will be used

I confirmed that all of the values are positive. What might be happening here?

Edit: I am not sure if the Gamma Distribution might be a better fit for my dataset; it returns the same error.

Hi Stephanie,
This is because the target variable has zeros even though it does not include negative values.
I tried replacing zeros with 0.01, and with the modification, I could run the model with gamma distribution, though Iā€™m not sure such a preprocessing is appropriate in the context of your analysis.

1 Like