# Zero-inflated Gaussian for weights below zero recorded as 0?

I'm aware of the general idea behind zero-inflated model, and have used the zero-inflated Poisson and negative binomial. However, the data I currently have has a little different format that makes me think these may not be good choices.

The dependent variable is weight gain. However the data is truncated at 0, so anyone who didn't gain any weight was just marked as "no weight gain." Everyone else has the weight gained in pounds. I could treat this as negative binomial counts, as the weight gain is rounded to integer lbs, but this seems incorrect since the variable is fundamentally continuous.

Is a zero-inflated gaussian a good fit/even possible? Does anyone know of an implementation of this type of model in R?

• If you don't have access to the unrounded values, I don't see how you can call the data continuous.
– Dave
Sep 13 at 14:46
• Possibly of interest is this post which derives the CDF of a Gaussian which is truncated at 0. stats.stackexchange.com/questions/392226/… But it's not a direct answer to the question.
– Sycorax
Sep 13 at 14:49
• This is censored data, and the appropriate analysis should be applied. The problem is with how data are recorded/stored, not the underlying model (ie you can assume weight gain is normally distributed, but all weight gain less than 0 is censored to 0). Sep 13 at 14:55
• @dave the rounded values would be interval censored, but it probably makes only a little difference to just treat the rounded values as continuous in this case - and then also left censored at 0. Sep 14 at 8:12
• @Ben yes, the model describe below in the answer is a Tobit. Sep 14 at 20:28

I think the model is more appropriately a left-censored Gaussian, since the process you describe is about discarding information below some value (in this case, the location is known to be 0, which is simpler than the case of an unknown censoring value). In other words, there's some real quantity which can (hypothetically) be measured, but that quantity is not recorded. We need to use a modeling tool that reflects that there is some true, non-censored value, but that this value is not available to us.

One resource I happen to have on my bookshelf is Gelman et al., Bayesian Data Analysis (3rd edition). Censoring and truncation models are discussed starting on page 224. The authors write

Suppose an object is weighed 100 times on an electronic scale with a known measurement distribution $$\mathcal{N}(\theta,1^2)$$, where $$\theta$$ is the true weight of the object....

[T]he scale has an upper limit of 200 kg for reports: all values above 200kg are reported as "too heavy." The complete data are still $$\mathcal{N}(\theta,1^2)$$, but the observed data are censored; if we observe "too heavy," we know that it corresponds to a weighing with a reading above 200.

This is very similar to the problem as the one stated by OP, with the exception that it's censored above 200 instead of below 0, and the concept that each item is weighed repeatedly with some instrument error.

One R package that seems relevant is censReg.

We demonstrate how censored regression models (including standard Tobit models) can be estimated in R using the add-on package censReg. This package provides not only the usual maximum likelihood (ML) procedure for cross-sectional data but also the random-effects maximum likelihood procedure for panel data using Gauss-Hermite quadrature.

I haven't used it, so I can't vouch for its quality or utility in this problem. There are probably lots of other options. The approach taken in Bayesian Data Analysis is to just code up your own model, either using the base library, or using stan. This has the greatest degree of flexibility, at the cost of having to do the coding yourself.

• Great, this is very useful. I've heard but not come across censored data before. Thank you for the explanation. I'll take a look at those packages and see what I can do. Sep 13 at 18:07
• Another option is the GLMMadaptive package and the censored.normal() family object. An example is given here: drizopoulos.github.io/JMbayes2/articles/… Sep 15 at 1:18