Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In R, I am using the bc function to do a box-cox transformation. What factors do I need to consider when setting p (the power argument)?

share|improve this question
The answer varies according to your reason for considering the transformation: whether it is for exploratory or confirmatory purposes, whether it is a dependent or independent variable in a regression, and so on. Could you perhaps share some of that relevant information with us so we can give you appropriate, focused answers? – whuber May 30 '12 at 1:15
It's for exploratory purposes. I'd like to transform certain measures of an event into a comparable space for clustering (euclidean distance perhaps?). In order to get a roughly normal distribution in order to use scale to get standard scores, I'm transforming these measures – user1202664 May 30 '12 at 8:32
up vote 3 down vote accepted

I've found that I can use the following to get a transformation that best approximates a normal distribution:

bc(x=vecToTransform, p=boxcoxfit(y)$lambda)
share|improve this answer

If this is on a single variable, a likelihood profile wrt p is typically used, as in Wikipedia example. Note that you need to use the right scale with geometric means of your variable and such for it to make sense.

share|improve this answer
Thanks. What do you mean by "Note that you need to use the right scale with geometric means of your variable and such for it to make sense." How can I implement this? – user1202664 May 29 '12 at 23:16
Box-Cox transformation is not just $x^\lambda$, it is $\lambda\frac{x^\lambda - 1}{\dot x^{\lambda-1}}$ where $\dot x$ is the geometric mean. The reason for introducing this geometric mean is to provide correct likelihood ratio tests. – StasK May 30 '12 at 1:27

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.