Chapter 13. Bridge to econometrics
Unit 13.5. Criterion of linear dependence and the dummy variable trap
We conclude this chapter with two applications of the notion of linear dependence introduced in the previous unit. The first one is an algebraic way to check linear dependence. The second one explains the so-called dummy variables trap.
Criterion of linear dependence.
As explained in Box 3.1 in the book, the equations $latex y_i = \beta_1 + \beta_2 X_{2i} + \ldots + \beta_k X_{ki} + u_i$, $latex i = 1, \ldots, n$, can be written in the form
$latex y_i = \beta_1 X_{1i} + \beta_2 X_{2i} + \ldots + \beta_k X_{ki} + u_i, \quad i = 1, \ldots, n, \qquad (\textrm{Eq. 13.9})$
by introducing the trivial regressor $latex X_{1i} = 1$. Let us put the coordinates of the vectors $latex X_1, \ldots, X_k$ into one big matrix
$latex X = \left( \begin{array}{ccc} X_{11} & \ldots & X_{k1} \\ \ldots & \ldots & \ldots \\ X_{1n} & \ldots & X_{kn} \end{array} \right)$
(the first column contains the coordinates of $latex X_1$, $latex \ldots$, the $latex k$th column contains those of $latex X_k$). This matrix has as many rows as there are observations, and the number of columns equals the number of regressors, including the trivial regressor.
Definition 13.5 (Transposed matrix). The transposed matrix is obtained from $latex X$ by putting rows into columns and columns into rows:
$latex X^T = \left( \begin{array}{ccc} X_{11} & \ldots & X_{1n} \\ \ldots & \ldots & \ldots \\ X_{k1} & \ldots & X_{kn} \end{array} \right).$
You can think of transposition and determinant of a matrix as convenient formal ways to express facts of interest to us. We don't need to study their properties because software packages, including Excel, handle all matrix operations.
Theorem 13.1 (Criterion of linear dependence). Let $latex n > k$. Then $latex X_1, \ldots, X_k$ are linearly dependent if and only if $latex \det(X^T X) = 0$.
Comments. (1) The significance of this result is that, for a given set of vectors, searching for constants $latex c_1, \ldots, c_k$ that satisfy the linear dependence definition is usually difficult, while Theorem 13.1 does not appeal to any such constants. All you need is to know the matrix $latex X$, and the computer does for you the rest.
(2) Besides, it provides an exact condition for linear dependence. Therefore, by rejecting that condition we obtain the condition for linear independence: $latex X_1, \ldots, X_k$ are linearly independent if and only if $latex \det(X^T X) \neq 0$.
(3) The condition $latex \det(X^T X) \neq 0$ also happens to be a precise condition for existence of the inverse matrix $latex (X^T X)^{-1}$.
(4) In case of simple regression, we have to require $latex V(X) \neq 0$ to avoid division by zero in the slope estimator formula $latex \hat \beta_1 = \textrm{cov}(x, y) / V(x)$. The matrix formula of the OLS estimator for the multiple regression (Eq. 13.9) is
$latex \hat \beta = (X^T X)^{-1} X^T y. \qquad (\textrm{Eq. 13.10})$
You don't need to learn matrix algebra to understand that there is division by $latex X^T X$. Existence of the matrix $latex (X^T X)^{-1}$ is ensured by the condition $latex \det(X^T X) \neq 0$, which is an analog of the condition $latex V(X) \neq 0$ for simple regression. Summarizing, the following facts are equivalent (provided that $latex n > k$):
$latex \quad$(1) the regressors are linearly independent,
$latex \quad$(2) $latex \det(X^T X) \neq 0$,
$latex \quad$(3) the OLS estimator exists.
Definition 13.6 (Multicollinearity).
$latex \quad$(a) Precise (or exact) multicollinearity is when the regressors are linearly dependent or, equivalently, $latex \det(X^T X) = 0$. In this case the OLS estimator does not exist.
$latex \quad$(b) Multicollinearity is defined as the situation when the regressors are approximately linearly dependent. In this case $latex \det(X^T X)$ is not zero but is close to zero.
Perhaps, the variance-covariance formula for the OLS estimator (Eq. 13.10),
$latex \textrm{Var}(\hat \beta) = \sigma^2 (X^T X)^{-1}, \qquad (\textrm{Eq. 13.11})$
will help explain the problem with multicollinearity. Since $latex \det(X^T X)$ is not zero, the inverse matrix $latex (X^T X)^{-1}$ exists. However, that determinant is close to zero, and therefore the inverse $latex (X^T X)^{-1}$ has large elements. That's why the book says that some coefficient estimates have large variances.
The dummy variable trap.
Example 13.5. Suppose we want to see how power consumption varies with the season of the year. Let us denote $latex d_{win}$ the dummy variable for winter: it is 1 during winter and 0 during the rest of the year. Similarly, $latex d_{spr}, d_{sum}, d_{aut}$ are dummies for spring, summer and autumn, respectively. If our observations are seasonal and winter is considered the first season, the regressors look like this:
$latex d_{win} = \left( \begin{array}{c} 1 \\ 0 \\ 0 \\ 0 \\ \ldots \end{array} \right), \quad d_{spr} = \left( \begin{array}{c} 0 \\ 1 \\ 0 \\ 0 \\ \ldots \end{array} \right), \quad d_{sum} = \left( \begin{array}{c} 0 \\ 0 \\ 1 \\ 0 \\ \ldots \end{array} \right), \quad d_{aut} = \left( \begin{array}{c} 0 \\ 0 \\ 0 \\ 1 \\ \ldots \end{array} \right).$
Suppose we want to run the regression
$latex powercons = \beta_0 + \beta_1 d_{win} + \beta_2 d_{spr} + \beta_3 d_{sum} + \beta_4 d_{aut} + u.$
In addition to the four dummies, there is the trivial regressor
$latex X = \left( \begin{array}{c} 1 \\ 1 \\ 1 \\ 1 \\ \ldots \end{array} \right).$
It is easy to see that $latex X = d_{win} + d_{spr} + d_{sum} + d_{aut}$, that is, the regressors are linearly dependent, and our regression cannot be run.
In this example there are four categories (four seasons) and a full set of dummies, one for each category. In such a situation, the regressors, including the trivial one, are linearly dependent, so that perfect multicollinearity is present.
Definition 13.7 (Dummy variable trap). A dummy variable trap is the case of perfect multicollinearity resulting from inclusion in the model of the intercept and full set of dummies.
To avoid this trap, we can do one of two things: either (1) throw out the trivial regressor or (2) remove one of the dummies. The interpretation of the coefficients depends on what regressor you omit. In the first case the coefficients represent ups and downs from some abstract zero level. In the second case, suppose you remove $latex d_{win}$. Then the trivial regressor is responsible for winter, which is the so-called base category, and the coefficients of other seasonal dummies represent deviations from the winter level.
Previous: Linear dependence of vectors | Next: Questions for repetition (Chapter 13)
Want the whole book (all 14 chapters, exercises, and the index) as a single PDF? Available on Lulu for $1.99.
You must be logged in to post a comment.