16
$\begingroup$

I'm currently trying to apply a linear model (family = gaussian) to an indicator of biodiversity that cannot take values lower than zero, is zero-inflated and is continuous. Values range from 0 to a little over 0.25. As a consequence, there is quite an obvious pattern in the residuals of the model that I haven't managed to get rid of: enter image description here

Does anyone have any ideas on how to solve this?

$\endgroup$
  • 1
    $\begingroup$ Welcome to CV! Note that your username, identicon, & a link to your user page are automatically added to every post you make, so there is no need to sign your posts. In fact, we prefer you don't. $\endgroup$ – Silverfish Dec 21 '15 at 22:07
  • 3
    $\begingroup$ If it's zero-inflated it cannot be continuous, since continuous variables cannot have any jumps in the cdf (and there's clearly one at 0). It may be continuous aside from the 0's. $\endgroup$ – Glen_b -Reinstate Monica Dec 21 '15 at 22:54
  • $\begingroup$ Related: stats.stackexchange.com/questions/105320 $\endgroup$ – amoeba says Reinstate Monica Nov 12 '17 at 0:40
32
$\begingroup$

There are a variety of solutions to the case of zero-inflated (semi-)continuous distributions:

  • Tobit regression: assumes that the data come from a single underlying Normal distribution, but that negative values are censored and stacked on zero (e.g. censReg package)
  • hurdle or "two-stage" model: use a binomial model to predict whether the values are 0 or >0, then use a linear model (or Gamma, or truncated Normal, or log-Normal) to model the observed non-zero values
  • Tweedie distributions: distributions in the exponential family that for a given range of shape parameters ($1<p<2$) have a point mass at zero and a skewed positive distribution for $x>0$ (e.g. tweedie, cplm packages)

Or, if your data structure is simple enough, you could just use linear models and use permutation tests or some other robust approach to make sure that your inference isn't being messed up by the interesting distribution of the data.

There are R packages/solutions available for most of these cases.

There are other questions on SE about zero-inflated (semi)continuous data (e.g. here, here, and here), but they don't seem to offer a clear general answer ...

See also Min & Agresti, 2002, Modeling Nonnegative Data with Clumping at Zero: A Survey for an overview.

$\endgroup$
  • $\begingroup$ @Ben Bolker Would you "use a linear model (or Gamma, or truncated Normal, or log-Normal) to model the" predicted or actual non-zero values? $\endgroup$ – rolando2 Jan 14 '17 at 15:05

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.