0
$\begingroup$

I have a linear regression where the output variable is always greater equal zero with a nontrivial weight at exactly zero. The predictions of the model are also always greater than zero. What should a good residual plot look like?

The plot shows my actual residuals, plotted with R. There are roughly 10 million data points, so it shows densities. The plot is cut off to residuals smaller than 7. Most of the output variable are between 0 and 3, so there is a lot more density there but the output variable has a roughly exponential drop off with about a dozen data points bigger than 100.

As both output variable and prediction are postive there are no residuals in the triangle in the bottom left corner. What is the expected residual distribution in this setting?

the residual plot of my actual data

$\endgroup$
4
  • $\begingroup$ How is the prediction always positive? What type of regression did you run? Linear regression will make some predictions below 0, if some of the points are near 0. $\endgroup$
    – Peter Flom
    Commented Nov 23, 2018 at 11:06
  • $\begingroup$ Essentially the model is artifically forced to make predictions above zero. There are roughly 100 input variables that are all binary. Because the output represents a cost, negative coefficients are set to zero so that all the predictions become positive by definition. $\endgroup$
    – quarague
    Commented Nov 23, 2018 at 11:37
  • $\begingroup$ That is not a good method. You should use a method for positive values. See this thread stats.stackexchange.com/questions/138550/… $\endgroup$
    – Peter Flom
    Commented Nov 23, 2018 at 12:22
  • $\begingroup$ I agree that setting the coefficients to zero is not a mathematically sound method. However the methods described in your link all seem to require a strictly positive output variable. The discussion here stats.stackexchange.com/questions/41241/… suggests censoring, which makes sense for the concentrations there. The monetary costs I have on the other hand just are exactly zero in some cases (roughly 10%). $\endgroup$
    – quarague
    Commented Nov 23, 2018 at 13:52

0

Your Answer

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

Browse other questions tagged or ask your own question.