Given a model that predicts the value of a non negative variable is it okay to replace the negative predictions with zero? Is there a different methodology of dealing with this problem? Are the any complications?
-
3$\begingroup$ Related and possibly enlightening: Can a mathematically sound prediction interval have a negative lower bound? and Is it bad to have error bars constructed with standard deviation that spans to the negative scale while the variable itself shouldn't be negative? $\endgroup$– Stephan KolassaCommented Mar 22, 2021 at 16:28
1 Answer
The best approach is to use a model that respects the non-negativity of your outcome variable.
For example, if you are modeling probabilities, use logistic regression, not a linear regression with the probability as the outcome. If you are modeling counts, use a Poisson or negative binomial regression. If your values are all strictly positive, try modeling the logarithm of the values or using a generalized linear model with a logarithmic link.