Box-Cox Variable Transformation

Readings and References:


The Box-Cox transformation of a data variable X is defined by

X(λ) = (Xλ-1)/λ

Although the range of λ can cover the whole real line, -2 ≤ λ ≤ 2 is the area of interest in many econometric applications. If λ = 2, it is the quadratic transformation. If λ = 0.5, it is a square-root. A linear model corresponds to λ = 1, and the logarithmic transformation is the limiting case that λ -> 0 (by L'Hôspital's rule, limλ->0(Xλ-1)/λ = ln(X)).

The value of power λ may not be the same for each of the variables in the model. In particular, the dependent variable and independent variables as a group may take different Box-Cox transformations. Let α = (β,θ,λ)' be the vector of unknown parameters for a regression model:

ε = F(Y,X,α) = Y(θ) - X(λ)β

Or, Equivalently,

Y(θ) = X(λ)β + ε

where ε ~ normal(0,σ2I). The log-likelihood function is

ll(α,σ2|Y,X) = -½N [ln(2π)+ln2)] -½ (ε'ε/σ2) + (θ-1)∑i=1,2,...,Nln(|Yi|)

Note that for each data observation i, the Jacobian term is derived as Ji(θ) = |∂εi/∂Yi| = |Yiθ-1|. By substituting out σ2 = ε'ε/N, the concentrated log-likelihood function is

ll*(α|Y,X) = -½N [1+ln(2π)-ln(N)] -½N ln(ε'ε) + (θ-1) ∑i=1,2,...,Nln(|Yi|)
= -½N [1+ln(2π)-ln(N)] -½N ln**)
where ε* = ε / [(|Y1||Y2|...|YN|)(θ-1)/N]

Given the values of Box-Cox transformation parameters θ and λ, a wide range of model specifications are possible. Of course, θ and λ should be estimated simultaneously with β. The efficient estimator of α = (β,θ,λ)' is obtained by maximizing the above concentrated log-likelihood function. It is equivalent to minimizing the sum of squared weighted errors:

S*(β|Y,X) = ε**,

where ε* = wε, and w = 1/[(|Y1||Y2|...|YN|)(θ-1)/N].

Based on the estimated parameter vector α = (β,θ,λ)', a Box-Cox model is typically interpreted in terms of the elasticity. That is,

ln(Y)/∂ln(X) = (X/Y)(∂y/∂X) = (Xλ/Yθ

Example

Based on the money demand data given in Greene's Table 10.1 (p. 443 and 451) or MONEY.TXT, formulate and estimate the following functional forms of money demand equations (see also Greene's Example 10.11 for comparison):

M(θ) = β0 + β1 R(λ) + β2 Y(λ) + ε

As described in Greene's Example 10.5 and Table 10.3, M is the real stock of M2, R is the discount interest rate, and Y is the real GNP. Several variations of the Box-Cox transformation parameters may be estimated and tested for the most appropriate functional form of money demand equation:

  1. θ = λ, i.e.
    M(λ) = β0 + β1 R(λ) + β2 Y(λ) + ε
  2. θ -> 0, i.e.
    ln(M) = β0 + β1 R(λ) + β2 Y(λ) + ε
  3. λ -> 0, i.e.
    M(θ) = β0 + β1 ln(R) + β2 ln(Y) + ε
  4. θ -> 0 and λ -> 0, i.e.
    ln(M) = β0 + β1 ln(R) + β2 ln(Y) + ε


Copyright © Kuan-Pin Lin
Last updated: 10/10/2012