I have a weather data set with rainfall as response. It has 56% observations as 0, while the rest as continuous rainfall data. I can't use tobit, hurdle or any other zeroinfl() model as they require count data; my data is continuous. I know I need to use a mixture model or a two-part model without assuming an underlying normal distribution ...

My issue is that I don't know how to go about it: how would I model this in R? I searched online, but I couldn't find use cases for continuous data. I'm not sure whether I should create a logistic regression model first to predict rain or no rain (0 or 1) and the create another model to predict quantity of rain? Or does the mixture model do both things simultaneously?

  • 2
    $\begingroup$ A tobit model doesn't require count data. You can also make your own hurdle model by perform a binary regression on 0 vs. not 0, and then among the not zeros fit a zero-truncated model. This model can have a log link, which makes it function similar to a count-hurdle model without requiring integers counts. family = "quasipoisson" should do this. In Stata, you can just use the churdle command. $\endgroup$ – Noah Jul 23 '19 at 18:28
  • 2
    $\begingroup$ I'd try the gamlss package. It (and accompanying packages) supports so called zero-adjusted distributions (for example the zero-adjusted Gamma distribution ZAGA). These are basically hurdle models. $\endgroup$ – COOLSerdash Jul 23 '19 at 18:29
  • $\begingroup$ @Noah Is any transformation needed for the response or the predictor variables before modeling? Because there is non-linear relation in response vs predictor and non-constant variance in residuals. By the way, thank you for your valuable input. $\endgroup$ – Gourishankar Bawade Jul 23 '19 at 18:38
  • $\begingroup$ The time basis is important for rainfall. Are your measurements hourly, daily, ...? (I am guessing not yearly, although a few places in the world sometimes have zero rainfall in particular years.) Note that the tobit makes no sense here: you aren't postulating that negative rainfalls might have been observed but are censored at zero. $\endgroup$ – Nick Cox Jul 23 '19 at 18:38

I would recommend to start out from a tobit model, i.e., a normally distributed response censored at zero. This is a relatively simple model because (1) the normal distribution is relatively "easy" or "nice" and (2) the probability for observing a zero and the expectation of the positive observations is driven by the same effects in the regression model. This model can then serve as a benchmark for more advanced models.

To refine the model you can then make both of the aspects above more complicated:

  1. Instead of a normal distribution you can use a distribution with heavier tails, e.g., the logistic distribution or the Student t distribution. In another step you could also consider skewed distributions, if necessary.
  2. Instead of a censored model with only one part driving all properties of the distribution you could consider a two-part hurdle model. Thus, you could fit a binary model to capture the probability of a zero vs. non-zero response and another zero-truncated model for the positive observations.

Of course, both aspects can be combined, e.g., you can first fit a zero-censored logistic model (one part) and then a two-part hurdle model (binary logistic regression for zero vs. non-zero plus a zero-truncated logistic model).

In my experience, specifically for modeling precipitation, it is crucial to consider heteroscedastic models instead of assuming a constant variance!

For a worked example of 3-day precipitation modeling (using regressors from a numerical weather prediction model) using the models above, see Messner et al. (2016, R Journal, doi:10.32614/RJ-2016-012). We employ our crch for censored regression with conditional heteroscedasticity. This supports both censoring and truncation and various response distributions.

For even more distributions, the gamlss family of packages is very useful with all the gamlss.dist distributions that can be both censored (gamlss.cens) or truncated (gamlss.tr).

  • 1
    $\begingroup$ Thank you so much for the detailed response @Achim. I'll get back to you after trying this. $\endgroup$ – Gourishankar Bawade Aug 2 '19 at 8:45

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.