Take the 2-minute tour ×
Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. It's 100% free, no registration required.

I am testing whether price per ounce of beer (continuous variable, range of values mostly between 0.1 and 0.5 dollars) and the presence of promotion, advertisement, and display (all binary) have effect on the total amount of ounces purchased (continuous variable). Here is my residual vs. fitted plot before the log transformation of y:

before log transformation of y

This is the residuals vs. fitted plot after the log transformation of y:

after log transformation of y

Heteroskedasticity is very high (White's general t statistics is nearly 800).

This is the histogram of the transformed y:

enter image description here

Any ideas or suggestions on how to improve my model or where to look for errors in order to improve the problem of heteroskedasticity are greatly appreciated.

share|improve this question

1 Answer 1

Your response variable isn't really continuous. It is presumably discrete (you can't buy .5 ounces, and moreover, beers only come in certain ounce sizes). In addition, no one can buy less than 0 ounces (you can clearly see the floor effect in your top--untransformed--residual plot). As a result, using an OLS regression (that assumes normal residuals) is likely to be inappropriate. You should probably try to use Poisson regression. In fact, a zero-inflated Poisson, negative binomial, or zero-inflated negative binomial are more likely what you will end up needing.

share|improve this answer
Here is a correction: My response variable is in fact continuous because I was able to calculate total ounces purchased per transaction regardless of size or form of beer packages. Any more suggestions? –  Olga Jun 15 at 18:06
The fact that you were able to get the exact number is nice, but those numbers only come in certain possible increments (eg, no .5's & no -3's). You would still be better served by using a count model. –  gung Jun 15 at 18:18
You can even see this behavior in the log-transformed response histogram: you have "spikes" and deep valleys that arise because the response variable, while not necessarily integer-valued, is also not truly continuous because beer is typically sold in standardized volumes, so certain values are much more common than others. –  heropup Jun 15 at 20:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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