I am thinking about a problem which is to predict log(spend) of a customer using linear regression.

I am considering what features to use as input and wondering if it would be OK to use the percentile of a variable as inputs.

For example I could use the companies revenue as a input. What I'm wondering is whether I could use the company revenue percentile instead.

Another example would be a categorical industry classifier (NAICS) - if I were to look at median spend per NAICS code and then assign each NAICS code to a 'NAICS Percentile', would that be a valid explanatory variable I could use?

Just wondering if there are any issues to be aware of when using percentiles? Is it in some ways equivalent to a type of feature scaling?

  • 2
    $\begingroup$ If you have the original data, why would you like to use percentiles? Maybe it's not a good idea, because percentiles are only ordinal, not metric measures. But I'm unsure about bias / efficiency. $\endgroup$ – hplieninger Jul 25 '13 at 9:20
  • 9
    $\begingroup$ Percentiling of $X$s is inconsistent with they way the $X$s have their effect. A common error is to percentile weight or BMI when predicting a health outcome. The physics of weight dictate that it is the physical dimensions of a person that relate to their body functions, not how many persons in the sample who are below the one subject's weight or BMI. $\endgroup$ – Frank Harrell Jul 25 '13 at 11:02
  • 1
    $\begingroup$ if you can reasonably cluster your industry variable in groups, e.g. 4, use dummy coding (or any other appropriate coding scheme) and you're done. That's the way I would do it. $\endgroup$ – hplieninger Jul 25 '13 at 11:18
  • 3
    $\begingroup$ I can't think of a reason why the percentile would be linearly related to the dependent variable. If you can think of one, then it might be OK (and please update your question with your reason) $\endgroup$ – Peter Flom Jul 25 '13 at 11:57
  • 1
    $\begingroup$ If you want to use NAICS code as a proxy for a company's spend, then you can do so using the average spend in its NAICS code - no need to use percentiles. $\endgroup$ – Scortchi - Reinstate Monica Jul 26 '13 at 10:56

If your model entails some sort of contest in firm revenues, you can use percentile. Log percentile seems more meaningful, quantiles are not going to be linear in value, or so I imagine.

In this story, you include ln(%) of firms with revenues under the observation firm. The story is that with high revenues have reputations that are better than firms with low revenues, and this relation of "having more than the competition" is relevant, not the level of revenue itself. I could see this as an important part of firm recognition and branding.


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.