I'm working on a linear regression formula for a forecasting model. My model requires non-negative predictions.

The model works well when predictors have big values; however, I get negative predictions pretty often when predictors have small values.

I was hoping to find a solution whereby the model wouldn't be linear but somewhat exponential to converge to 0, but not getting there unless the variables are both 0.

This is an example of my constant and coefficients for two variables:

CONST   -202,4356389
COV        0,741149304
USERS    369,5808457
  • $\begingroup$ You mean negative regression coefficients? Why do they need to be "non negative"? What do you mean by "big variables"? $\endgroup$ Commented Aug 5, 2016 at 9:49
  • 2
    $\begingroup$ Don't do that then. To ensure positive predictions, which is the issue here, you need to use a logarithmic link (in generalized linear model terminology). In fact Poisson regression works well even for non-counted variables. See blog.stata.com/2011/08/22/… $\endgroup$
    – Nick Cox
    Commented Aug 5, 2016 at 9:53
  • $\begingroup$ I've edited presentation rather heavily (it's evident that English is not your first language) but do check that I have your meaning correctly given. $\endgroup$
    – Nick Cox
    Commented Aug 5, 2016 at 9:58
  • $\begingroup$ I don't mean the coefficients have to be positive, I only want the results to be positive, I'm currently using excel to generate the coefficients, I would like a way to convert my model in such a way to always give positive values and still be as accurate. $\endgroup$
    – Kadi
    Commented Aug 5, 2016 at 10:13
  • 4
    $\begingroup$ Can you define what you mean "as accurate"? Accurate measured how? What sort of thing is the response measuring? Is it counts? Some kind of measurement? Times? A monetary amount? $\endgroup$
    – Glen_b
    Commented Aug 5, 2016 at 10:36

1 Answer 1


As @Nick Cox points out in a comment, if you want your predicted values to always be positive, you don't want linear regression. If the dependent variable is a count (and maybe even if it is not) you could use Poisson regression or negative binomial regression. If it is bounded, you can transform it to 0-1 and then use beta regression. There are other options too.

Or it might be that you want to transform your dependent variable. If your DV is never negative then you can take the log. Then the predicted values on the raw score would never be negative.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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