




























































































Prepara tus exámenes y mejora tus resultados gracias a la gran cantidad de recursos disponibles en Docsity
Gana puntos ayudando a otros estudiantes o consíguelos activando un Plan Premium
Esta página no es visible en la vista previa
¡No te pierdas las partes importantes!





























































































(^1) This manuscript may be printed and reproduced for individual or instructional use, but may not be
printed for commercial purposes.
worker’s education, holding other variables constant. Another issue of interest is the earnings gap between men and women. In these examples, yi might be wages and xi could include gender, race, education, and experience. Ideally, we would use experimental data to answer these questions. To measure the returns to schooling, an experiment might randomly divide children into groups, mandate different levels of education to the different groups, and then follow the children’s wage path as they mature and enter the labor force. The differences between the groups could be attributed to the different levels of education. However, experiments such as this are infeasible, even immoral! Instead, most economic data is observational. To continue the above example, what we observe (through data collection) is the level of a person’s education and their wage. We can thus measure the joint distribution of these variables, and assess the joint dependence. But we cannot infer causality, as we are not able to manipulate one variable to see the direct effect on the other. For example, a person’s level of education is (at least partially) determined by that person’s choices and their personal achievement in education. These factors are likely to be affected by their personal abilities and attitudes towards work. The fact that a person is highly education suggest a high level of ability. This is an alternative explanation for the positive correlation between educational levels and wages. High ability individuals do better in school, and therefore choose to attain higher levels of education, and their high ability is the fundamental reason for their high wages. The point is that multiple explanations are consistent with a positive correlation between schooling levels and education. Knowledge of the joint distibution cannot distinguish between these explanations. This discussion means that causality cannot be infered from observational data alone. Causal inference requires identification, and this is based on strong assumptions. We will return to a discussion of some of these issues in Chapter 7.
1.3 Conditional Mean
To study how the distribution of yi varies with the variables xi in the population, we can focus on f (y | x) , the conditional density of yi given xi. This is well defined whether or not the effect of xi on yi is causal or observational. To illustrate, Figure 1.1 displays the density^1 of hourly wages for men and women. The population is Caucasian non-military wage earners with a college degree and 10-15 years of potential work experience. These are conditional density functions — the density of hourly wages conditional on race, gender, education and experience. The two density curves show the effect of gender on the distribution of wages, holding the other variables constant. While it is easy to observe that the two densities are unequal, it is useful to have numerical measures of the difference. An important summary measure is the conditional mean
m(x) = E (yi | xi = x) =
−∞
yf (y | x) dy. (1.1)
In general, m(x) can take any form, and exists so long as E |yi| < ∞. In the example presented in Figure 1.1, the mean wage for men is $26.81, and that for women is $20.33. These are indicated in Figure 1.1 by the arrows drawn to the x-axis. The comparison in Figure 1.1 is facilitated by the fact that the control variable (gender) is discrete. When the distribution of the control variable is continuous, then comparisons become
(^1) These are nonparametric density estimates using a Gaussian kernel with the bandwidth selected by cross- validation. See Chapter 12. The data are from the 2004 Current Population Survey
Figure 1.1: Wage Distribution for Caucasian College Grads with 10-15 Years Work Experience
more complicated. To illustrate, Figure 1.2 displays a scatter plot^2 of wages against education levels. Assuming for simplicity that this is the true joint distribution, the solid line displays the conditional expectation of wages varying with education. The conditional expectation function is close to linear; the dashed line is a linear projection approximation which will be discussed in the next section. The main point to be learned from Figure 1.2 is how the conditional expectation describes an important feature of the conditional distribution. Of particular interest to students in a Ph.D. program may be the observation that difference in mean hourly wages between a B.A. and a Ph.D. degree is $7.70, or about $16,000 annually.
1.4 Regression Equation
The regression error εi is defined to be the difference between yi and its conditional mean (1.1):
εi = yi − m(xi).
By construction, this yields the formula
yi = m(xi) + εi. (1.2)
Theorem 1.4.1 Properties of the regression error εi
The equations
yi = m(xi) + εi E (εi | xi) = 0.
are often stated jointly as the regression framework. It is important to understand that this is a framework, not a model, because no restrictions have been placed on the joint distribution of the data. These equations hold true by definition. A regression model imposes further restrictions on the joint distribution; most typically, restrictions on the permissible class of regression functions m(x). The conditional mean also has the property of being the the best predictor of yi, in the sense of achieving the lowest mean squared error. To see this, let g(x) be an arbitrary predictor of yi given xi = x. The expected squared error using this prediction function is
E (yi − g(xi))^2 = E (εi + m(xi) − g(xi))^2 = Eε^2 i + 2E (εi (m(xi) − g(xi))) + E (m(xi) − g(xi))^2 = Eε^2 i + E (m(xi) − g(xi))^2 ≥ Eε^2 i
where we have used the property that the regression error εi is orthogonal to any function of xi. The right-hand-side is minimized by setting g(x) = m(x). Thus the mean squared error is minimized by the conditional mean.
1.5 Conditional Variance
While the conditional mean is a good measure of the location of a conditional distribution, it does not provide information about the spread of the distribution. A common measure of the dispersion is the conditional variance
σ^2 (x) = V ar (yi | xi = x) = E
ε^2 i | xi = x
Generally, σ^2 (x) is a non-trivial function of x, and can take any form, subject to the restriction that it is non-negative. The conditional standard deviation is its square root σ(x) =
p σ^2 (x). Given the random variable xi, the conditional variance of yi is σ^2 i = σ^2 (xi). In the general case where σ^2 (x) depends on x we say that the error εi is heteroskedastic. In contrast, when σ^2 (x) is a constant so that E
ε^2 i | xi
= σ^2 (1.3)
we say that the error εi is homoskedastic. Some textbooks inappropriately describe heteroskedasticity as the case where “the variance of εi varies across observation i”. This concept is less helpful than the correct definition of het- eroskedasticity as the dependence of the conditional variance on the observables xi. As an example, take the conditional wage densities displayed in Figure 1.1. The conditional standard deviation for men is 13.3 and that for women is 10.6. So while men have higher average wages, they are also more dispersed. As a second example take the joint distribution of wages and education as displayed in Figure 1.2. In Figure 1.3 we plot the associated conditional standard deviation function σ(x) plotted as a function of education. The dependence of the wage dispersion on eduction level is quite noticeable.
Figure 1.3: Conditional Standard Deviation of Wages Given Education
1.6 Best Linear Predictor
While the conditional mean m(x) = E (yi | xi = x) is the best predictor of yi among all functions of xi, its functional form is typically unknown. For empirical implementation and estimation, it is typical to replace the unknown function m(x) with a approximation. Most commonly, this approximation is linear in x (or linear in functions of x). Notationally, it is convenient to augment the regressor vector xi by listing the number “1” as an element. We call this the “constant” or “intercept”. We implement this augmentation by redefining xi as the (k + 1) × 1 vector
xi =
x 1 i .. . xki
Given this change of notation, a linear approximation takes the form
m(x) ≈ x^0 β = β 0 + x 1 iβ 1 + · · · + xkiβk
where
β =
β 0 β 1 .. . βk
is a (k + 1) × 1 parameter vector. To uniquely construct the linear approximation, we pick β so that the function x^0 iβ is the best linear predictor of yi. As before, by “best” we mean the predictor function with lowest mean
Equation (1.10) follows from (1.9) and the assumption that xi contains an intercept. ¥
Since E (xiei) = 0 we say that xi and ei are orthogonal. This means that the equation (1.8) can be alternatively interpreted as a projection decomposition. By definition, x^0 iβ is the projection of yi on xi since the error ei is orthogonal with xi. Since ei is mean zero by (1.10), the orthogonality restriction (1.9) implies that xi and ei are uncorrelated. Recall from Theorem 1.4.1.4 that the regression error εi has the property E (xiεi) = 0. This means that if the conditional mean is linear, so that m(x) = x^0 β, then the conditional mean and projection coincide, and εi = ei. This is a special situation known as a linear regression model yi = x^0 iβ + εi. It is special because in general the conditional mean function is nonlinear. While the projection error ei is orthogonal to xi, i.e. E(xiei) = 0, it does not (in general) have a zero conditional mean, i.e. E (ei | xi) 6 = 0. This is due to the discrepancy between the linear projection and the conditional mean. The conditions listed in Assumption 1.6.1 are weak. The requirements of finite variances are regularity conditions and are not considered important modelling assumptions. The critical condition is that Exix^0 i is invertible, which we now discuss. Observe that for any non-zero α ∈ Rk+1, α^0 Exix^0 iα = E (α^0 xi)^2 ≥ 0 so the matrix Exix^0 i is by construction positive semi-definite. It is invertible if and only if it is positive definite, written Exix^0 i > 0 , which requires that for all non-zero α, α^0 Exix^0 iα = E (α^0 xi)^2 > 0. Equivalently, there cannot exist a non-zero vector α such that α^0 xi = 0 identically. This occurs when redundant variables are included in xi. Assumption 1.6.1.4 excludes this troublesome case. We have shown that under mild regularity conditions, for any pair (yi, xi) we can define a linear projection equation (1.8) with the properties listed in Theorem 1.6.1. No additional assumptions are required. However, it is important to not misinterpret the generality of this statement. The linear equation (1.8) is defined by projection and the associated coefficient definition (1.6). In contrast, in many economic models, the parameter β may be defined within the model. In this case (1.6) may not hold and the implications of Theorem 1.6.1 may be false. These structural models require alternative estimation methods, and are discussed in Chapter 7. Returning to the joint distribution displayed in Figure 1.2, the dashed line is the linear pro- jection of wages on eduction. In this example the linear projection is a close approximation to the conditional mean. In other cases the two may be quite different. Figure 1.4 displays the relation- ship^3 between mean hourly wages and labor market experience. The solid line is the conditional mean, and the straight dashed line is the linear projection. In this case the linear projection is not a good approximation to the conditional mean. It over-predicts wages for young and old workers, and under-predicts for the rest. Most importantly, it misses the strong downturn in expected wages for those above 35 years work experience (equivalently, for those over 53 in age). This defect in linear projection can be partially corrected through a careful selection of re- gressors. In the example just presented, we can augment the regressor vector xi to include both experience and experience^2. A projection of wages on these two variables can perhaps be called a quadratic projection, since the resulting function is quadratic in experience. Other than the redefinition of the regressor vector, there are no changes in our methods or analysis. In Figure 1. we display as well this quadratic projection. In this example it is a much better approximation to the conditional mean than the linear projection.
(^3) Caucasian non-military male wage earners with 12 years of education.
Figure 1.4: Hourly Wage as a Function of Experience
and βˆ is the value which sets this equal to zero:
n
X^ n
i=
xi
yi − x^0 i ˆβ
n
X^ n
i=
xiyi −
n
X^ n
i=
xix^0 i βˆ
whose solution is (2.1).
2.2 Least Squares
There is another classic motivation for the estimator (2.1). Define the sum-of-squared errors (SSE) function
Sn(β) =
X^ n
i=
yi − x^0 iβ
The Ordinary Least Squares (OLS) estimator is the value of β which minimizes Sn(β). Observe that we can write the latter as
Sn(β) =
X^ n
i=
y i^2 − 2 β^0
X^ n
i=
xiyi + β^0
X^ n
i=
xix^0 iβ.
Matrix calculus (see Appendix B.7) gives the first-order conditions for minimization:
0 =
∂β Sn(βˆ)
X^ n
i=
xiyi + 2
X^ n
i=
xix^0 i βˆ
whose solution is (2.1). Following convention we will call βˆ the OLS estimator of β. As a by-product of OLS estimation, we define the predicted value
y ˆi = x^0 i βˆ
and the residual
ˆei = yi − yˆi = yi − x^0 i β.ˆ
Note that yi = ˆyi + ˆei. It is important to understand the distinction between the error ei and the residual eˆi. The error is unobservable, while the residual is a by-product of estimation. These two variables are frequently mislabeled, which can cause confusion. Equation (2.3) implies that 1 n
X^ n
i=
xieˆi = 0.
Since xi contains a constant, one implication is that
1 n
X^ n
i=
e ˆi = 0.
Thus the residuals have a sample mean of zero and the sample correlation between the regressors and the residual is zero. These are algebraic results, and hold true for all linear regression estimates. The error variance σ^2 = Ee^2 i is also a parameter of interest. It measures the variation in the “unexplained” part of the regression. The method of moments estimator is the sample average
ˆσ^2 =
n
X^ n
i=
ˆe^2 i. (2.4)
An alternative estimator uses the formula
s^2 =
n − k − 1
X^ n
i=
ˆe^2 i. (2.5)
A justification for the latter choice will be provided in Section 3.4. A measure of the explained variation relative to the total variation is the coefficient of de- termination or R-squared.
R^2 =
Pn i=1(x 0 i βˆ) 2 Pn i=1 (yi^ −^ y)
σˆ^2 σ ˆ^2 y
where
σ ˆ^2 y =
n
X^ n
i=
(yi − y)^2
is the sample variance of yi. The R^2 is frequently mislabeled as a measure of “fit”. It is an inappropriate label as the value of R^2 does not aid in the interpretation of parameter estimates or test statistics. Instead, it should be viewed as an estimator of the population parameter
ρ^2 =
V ar (x^0 iβ) V ar(yi)
σ^2 σ^2 y
where σ^2 y = V ar(yi). An alternative estimator of ρ^2 proposed by Theil called “R-bar-squared” is
R^2 = 1 − (ˆe^0 eˆ) / (n − k − 1) σ˜^2 y
= 1 − s^2 σ ˜^2 y
where
σ ˜^2 y =
n − 1
X^ n
i=
(yi − y)^2.
Theil’s estimator R 2 is an ratio of adjusted variance estimators, and therefore is expected to be a better estimator of ρ^2 than the unadjusted estimator R^2.
2.3 Model in Matrix Notation
For some purposes, including computation, it is convenient to write the model and statistics in matrix notation. We define
y 1 y 2 .. . yn
x^01 x^02 .. . x^0 n
, e =
e 1 e 2 .. . en
2.4 Residual Regression
Partition X = [X 1 X 2 ]
and
β =
μ β 1 β 2
Then the regression model can be rewritten as
Y = X 1 β 1 + X 2 β 2 + e. (2.7)
Observe that the OLS estimator of β = (β^01 , β^02 )^0 can be obtained by regression of Y on X = [X 1 X 2 ]. OLS estimation can be written as
Y = X 1 ˆβ 1 + X 2 βˆ 2 + ˆe. (2.8)
Suppose that we are primarily interested in β 2 , not in β 1 , so are only interested in obtaining the OLS sub-compontent ˆβ 2. In this section we derive an alternative expression for βˆ 2 which does not involve estimation of the full model. Define M 1 = In − X 1
Recalling the definition M = I − X (X^0 X)−^1 X^0 , observe that X^01 M = 0 and thus
M 1 M = M − X 1
It follows that M 1 ˆe = M 1 Me = Me = ˆe. Using this result, if we premultiply (2.8) by M 1 we obtain M 1 Y = M 1 X 1 βˆ 1 + M 1 X 2 βˆ 2 + M 1 eˆ = M 1 X 2 βˆ 2 + ˆe (2.9)
the second equality since M 1 X 1 = 0. Premultiplying by X^02 and recalling that X 20 ˆe = 0, we obtain
X^02 M 1 Y = X 20 M 1 X 2 βˆ 2 + X 20 eˆ = X 20 M 1 X 2 βˆ 2.
Solving, βˆ 2 = ¡X 20 M 1 X 2 ¢−^1 ¡X 20 M 1 Y ¢
an alternative expression for ˆβ 1. Now, define
X^ ˜ 2 = M 1 X 2 (2.10) Y^ ˜ = M 1 Y, (2.11)
the least-squares residuals from the regression of X 2 and Y, respectively, on the matrix X 1 only. Since the matrix M 1 is idempotent, M 1 = M 1 M 1 and thus
This shows that ˆβ 1 can be calculated by the OLS regression of Y˜ on X˜ 2. This technique is called residual regression. Furthermore, using the definitions (2.10) and (2.11), expression (2.9) can be equivalently writ- ten as Y˜ 2 = ˜X 2 βˆ 2 + ˆe.
Since ˆβ 2 is precisely the OLS coefficient from a regression of Y˜ 2 on X˜ 2 , this shows that the residual from this regression is ˆe, numerically the same residual as from the joint regression (2.8). We have proven the following theorem.
Theorem 2.4.1 (Frisch-Waugh-Lovell). In the model (2.7), the OLS estimator of β 2 and the OLS residuals eˆ may be equivalently computed by either the OLS regression (2.8) or via the following algorithm:
In some contexts, the FWL theorem can be used to speed computation, but in most cases there is little computational advantage to using the two-step algorithm. Rather, the theorem’s primary use is theoretical. A common application of the FWL theorem, which you may have seen in an introductory econometrics course, is the demeaning formula for regression. Partition X = [X 1 X 2 ] where X 1 = ι is a vector of ones, and X 2 is the vector of observed regressors. In this case,
M 1 = I − ι
ι^0 ι
ι^0.
Observe that
X^ ˜ 2 = M 1 X 2 = X 2 − ι ¡ι^0 ι¢−^1 ι^0 X 2 = X 2 − X 2
and
Y^ ˜ = M 1 Y = Y − ι ¡ι^0 ι¢−^1 ι^0 Y = Y − Y ,
which are “demeaned”. The FWL theorem says that βˆ 2 is the OLS estimate from a regression of Y^ ˜ on X˜ 2 , or yi − y on x 2 i − x 2 :
βˆ 2 =
à (^) n X
i=
(x 2 i − x 2 ) (x 2 i − x 2 )^0
!− 1 Ã (^) n X
i=
(x 2 i − x 2 ) (yi − y)
Thus the OLS estimator for the slope coefficients is a regression with demeaned data.