6
$\begingroup$

If I want to make a regression model where sales in billions are dependent variable and my independent variables consist of very low values, for example rainy days (highest number is 15). My question is, is there any problem if I do a regression with original data, or should I do some transformation and therefore make my variables comparable? And which transformation would you suggest? Is sensible to use logarithmic transformation of data here?

I tried to find similar discussion, but struggled to do it.

$\endgroup$
  • 4
    $\begingroup$ As @mdewey wisely answers, the coefficients do the scaling but as a matter of practicality changing units to get coefficients closer to 1 is often a good idea. But your description to me raises a more fundamental question. Sales can't be negative, presumably, but they could be highly skewed. For that reason alone I'd expect Poisson regression (or the same beast under any other name) to be a better bet. For more on why, one way in is blog.stata.com/2011/08/22/… (That sales are measured not counted is not crucial!) $\endgroup$ – Nick Cox Dec 1 '16 at 11:01
  • $\begingroup$ as @NickCox suggests, sales can be highly - I would add positively - skewed. So a log transformation may be better choice, as it scales the response and may make it look more symmetric. $\endgroup$ – utobi Dec 1 '16 at 11:06
  • 2
    $\begingroup$ Poisson regression arguably has all the advantages of logarithmic transformation and none of the disadvantages. Note that predictions are automatically of sales, not of log sales. $\endgroup$ – Nick Cox Dec 1 '16 at 11:17
  • $\begingroup$ Those are good points @NickCox, I had assumed that sales were in some currency unit. I will update my answer to clarify. $\endgroup$ – mdewey Dec 1 '16 at 13:14
  • $\begingroup$ @mdewey My guess is the same as yours, that sales may be in currency units and they could then be regarded as counts of whatever the smallest currency unit is. Whether they behave as counts are expected to behave (according to some model) can only be checked with access to the data! $\endgroup$ – Nick Cox Dec 1 '16 at 13:20
6
$\begingroup$

Transformations are like drugs ... Some are good for you and some aren't.

Transforming data by scaling is almost always a good idea . Transforming time series data like taking differences can be a bad idea as an unwarranted difference can actually inject structure into the data. Transforming data by replacing anomalous values by cleansed values enabling a clearer picture robust to the anomalies is also a good idea just as long as you get motivated to find out why the data was anomalous AND enable confidence limits that include the possibility of anomalous values . See @Aksakal's very wise words on this How to fit a model for a time series that contains outliers

Power Transforms like logs or any other assumed transformation can be a bad idea . See When (and why) should you take the log of a distribution (of numbers)? for a discussion of when and why you should transform. One caveat there are certain model objectives i.e. specific models which require transformations but these are usually special purpose and rare.

$\endgroup$
6
$\begingroup$

There is no particular reason for wanting to transform your data as far as the adequacy of the model is concerned. However you may want to re-scale your outcome to make the coefficients lie in a more manageable range. For instance instead of having sales as the raw count you might express it as so many millions or so many thousands. This would have the effect of dividing your coefficient for rainy days by 1000 or 1000000 which might make it look more sensible. This is often done for predictor variables but in your case from your description it is the outcome which needs attention.

Your model adequacy is not changed though which is the important thing.

As pointed out by commentators I am assuming that sales are billions of some currency unit which if it is the sales of different products sold at different prices may well fulfill the usual assumptions of linear regression. However if it is billions of umbrellas and hence a count then a different model such as Poisson may be appropriate.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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