Box-cox & power transformation


Allows to create a new variable containing a power transformation of a numeric variable. The transformation is defined by a power parameter λ (Lambda):

x(λ) = xλ when λ ≠ 0
x(λ) = log(x)  when λ = 0

Optionally, you can select the Box-Cox transformation. The Box-Cox power transformation is defined as:

x(λ) = (xλ − 1) / λ  when λ ≠ 0
x(λ) = log(x)  when λ = 0

When some of the data are negative, a shift parameter c needs to be added to all observations (in the formulae above x is replaced with x+c).

Required input

  • Target variable: the variable which you want to contain the rank numbers.
    • New variable: select this option and enter the name of a new variable (and a new column) in the data table.
    • Overwrite existing variable: select this option to select an existing variable or column in the data table. The corresponding column will be cleared before the rank numbers are generated.
  • Data: select the numeric variable and a possible filter.
  • Transformation parameters
    • Lambda: the power parameter λ
    • Shift parameter: the shift parameter is a constant c that needs to be added to the data when some of the data are negative.
    • Button Get from data: click this button to estimate the optimal value for Lambda, and suggest a value for the shift parameter c when some of the observations are negative. The program will suggest a value for Lambda with 2 to 3 significant digits. It may be advantageous to manually round this value to values such as −3, −2, −1, −0.5, 0, 0.5, 1, 2 and 3 (see below).
    • Option Box-Cox transformation: select this option to use the Box-Cox power transformation as described above.

Click OK to proceed. The selected column in the data table is filled with the power-transformed data.

Interpretation of the power transformation

When you do not select Box-Cox transformation and the shift parameter c is zero then the power transformation is easy to interpret for certain values of lambda, for example:

λ = 0 logarithmic transformation
λ = 0.5 square root transformation
λ = −1 inverse transformation
λ = 1 no transformation!

See also


Go to Box-cox & power transformation.