Docsity

Linear Regression Models: Assumptions, Properties, and Ordinary Least Squares, Essays (high school) of English Literature

Toggle sidebar
bg1
Chapter 2
Linear Regression Models, OLS, Assumptions and
Properties
2.1 The Linear Regression Model
The linear regression model is the single most useful tool in the econometrician’s kit.
The multiple regression model is the study if the relationship between a dependent
variable and one or more independent variables. In general it can be written as:
y=f(x1,x2,...,xK) + ε(2.1)
=x1β1+x2β2+···+xKβK+ε.
The random disturbance εarises because we cannot capture every influence on
an economic variable in a model. The net effect of the omitted variables is captured
by the disturbance. Notice that yis the summation of two parts, the deterministic
part and the random part, ε. The objective is to estimate the unknown parameters
(β1,β2, . . . , βK) in this model.
2.2 Assumptions
The classical linear regression model consist of a set of assumptions how a data set
will be produced by the underlying ‘data-generating process.’ The assumptions are:
A1. Linearity
A2. Full rank
A3. Exogeneity of the independent variables
A4. Homoscedasticity and nonautocorrelation
A5. Data generation
A6. Normal distribution
5
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe

Partial preview of the text

Download Linear Regression Models: Assumptions, Properties, and Ordinary Least Squares and more Essays (high school) English Literature in PDF only on Docsity!

Chapter 2

Linear Regression Models, OLS, Assumptions and

Properties

2.1 The Linear Regression Model

The linear regression model is the single most useful tool in the econometrician’s kit. The multiple regression model is the study if the relationship between a dependent variable and one or more independent variables. In general it can be written as:

y = f (x 1 , x 2 ,... , xK ) + ε (2.1) = x 1 β 1 + x 2 β 2 + · · · + xK βK + ε.

The random disturbance ε arises because we cannot capture every influence on an economic variable in a model. The net effect of the omitted variables is captured by the disturbance. Notice that y is the summation of two parts, the deterministic part and the random part, ε. The objective is to estimate the unknown parameters (β 1 , β 2 ,... , βK ) in this model.

2.2 Assumptions

The classical linear regression model consist of a set of assumptions how a data set will be produced by the underlying ‘data-generating process.’ The assumptions are:

A1. Linearity A2. Full rank A3. Exogeneity of the independent variables A4. Homoscedasticity and nonautocorrelation A5. Data generation A6. Normal distribution

5

6 2 Linear Regression Models, OLS, Assumptions and Properties

2.2.1 Linearity

The model specifies a linear relationship between y and x 1 , x 2 ,... , xK. The column vector xk contains the n observations of the variable xk, k = 1 , 2 ,... K, which can be written in a single n × K data matrix X. When the model is estimated with a constant term, the first column of X is assumed to be a columns one ones, making β 1 the coefficient associated with the constant of the model. The vector y contains the n observations, y 1 , y 2 ,... , yn, and the vector ε contains all the n disturbances. The model can be represented as:

    

y 1 y 2 .. . yn

n× 1

1 x 11 x 21... xK 1 1 x 12 x 22... xK 2 .. .

1 x 1 n x 2 n... xKn

n×K

β 1 β 2 .. . βK

K× 1

ε 1 ε 2 .. . εK

n× 1

In matrix form the model can be written as:

ASSUMPTION 1 : y = Xβ + ε (2.2) Notice that the assumption means that Equation 2.2 can be either in terms of the original variables or after some transformation. For example, consider the following two equations:

y = Axβ^ eε y = Axβ^ + ε.

While the first equation can be made linear by taking logs, the second equation is not linear. Typical examples include the constant elasticity model:

ln y = β 1 + β 2 ln x 2 + β 3 x 3 + · · · + βK xK + ε

where the elasticity between y and xk is given by ∂ ln y/∂ ln xk = βk. Another com- mon model is the semilog.

2.2.2 Full rank

Full rank or identification condition means that there are no exact linear relation- ships between the variables.

ASSUMPTION 2 : X is an n × K matrix with rank K. (2.3) X is a full column rank means that the columns of X are linearly independent and that there are at least K observations.

8 2 Linear Regression Models, OLS, Assumptions and Properties

2.2.5 Data generation

It is mathematically convenient to assume xi is nonstochastic, like in an agricultural experiment where yi is yield and xi is the fertilizer and water applied. However, social scientist are very likely to find stochastic xi. The assumption we will use is that X can be a mixture of constant and random variables, and the mean and variance of εi are both independent of all elements of X.

ASSUMPTION 5 : X may be fixed or random. (2.7)

2.2.6 Normal distribution

The last assumption, which is convenient, but not necessary to obtain many of the results of the linear regression model is that the residuals follow a normal distribu- tion with zero mean and constant variance. That is adding normality to Assumptions 3 and 4.

ASSUMPTION 6 : ε|X ∼ N[ 0 , σ 2 I]. (2.8) The assumptions of the linear regression model are summarized in Figure 2.1.

Fig. 2.1 Classical Regression Model, from [Greene (2008)].

2.3 Ordinary Least Squares Regression 9

2.3 Ordinary Least Squares Regression

The first distinction needed at this point is between population parameters and sam- ple estimates. From the previous discussion we have β and εi as population param- eters, hence we use b and ei as their sample estimates. For the population regression we have E[yi|xi] = x′ iβ , however β is unknown and we use its estimate b. Therefore we have: E[yi|xi] = yˆi = x′ ib. (2.9) For observation i, the (population) disturbance term is given by:

εi = yi − x′ iβ. (2.10)

Once we estimate b the estimate of the disturbance term εi is its sample counter- part, the residual:^1 ei = yi − x′ ib. (2.11) It follows that yi = x′ iβ + εi = x′ ib + ei. (2.12)

A graphical summary of this discussion is presented in Figure 2.2. This figure shows the simple example of a single regressor.

2.3.1 Least Squares Coefficients

The problem in hand is to obtain an estimate of the unknown population vector β based on the sample data (yi, xi) for i = 1 , 2 , · · · , n. In this section we will derive the least squares estimator vector for β , denoted by b. By definition, the least squares coefficient vector minimizes the sum of squared residuals:

n ∑ i= 1

e^2 i 0 =

n ∑ i= 1

(yi − x′ ib 0 )^2. (2.13)

The idea is to pick the vector b 0 that makes the summation in Equation 2.13 the smallest. In matrix notation:

min b 0 S(b 0 ) = e′ 0 e 0 = (y − Xb 0 )′(y − Xb 0 ). (2.14)

min b 0 S(b 0 ) = y′y − b′ 0 X′y − y′Xb 0 + b′ 0 X′Xb 0

min b 0

S(b 0 ) = y′^ − 2 y′Xb 0 + b′ 0 X′Xb 0.

(^1) [Dougherty (2007)] follows a similar notation, but most textbooks, e.g. [Wooldridge (2009)], use

βˆ as the sample estimate of β.

2.3 Ordinary Least Squares Regression 11

y ˆi = b 0 + b 1 xi

For observation i we obtain the residual, then square it and finally sum across all observations to obtain the sum of squared residuals:

ei = yi − yˆi (2.19) e^2 i = (yi − yˆi)^2 n ∑ i= 1

e^2 i =

n ∑ i= 1

(yi − yˆi)^2

Again, the coefficients b 0 and b 1 are chosen to minimize the sum of squared residuals:

min b 0 ,b 1

∑ni= 1 (yi −^ yˆi)^2 (2.20)

min b 0 ,b 1

∑ni= 1 (yi −^ b 0 −^ b 1 xi)^2

The first order necessary condition are:

n ∑ i= 1

(yi − b 0 − b 1 xi) = 0 w.r.t. b 0 (2.21)

n ∑ i= 1

xi(yi − b 0 − b 1 xi) = 0 w.r.t. b 1 (2.22)

Dividing Equation 2.22 by n and working through some math we obtain the OLS estimators for the constant:

b 0 = y¯ − b 1 x¯. (2.23)

Plugging this result into Equation 2.22 we obtain:

b 1 = ∑ni= 0 (xi − x¯)(yi − y¯) ∑ni= 0 (xi −^ x¯)^2

2.3.2 Normal equations

From the first order conditions in Equation 2.15 we can obtain the normal equations:

X′Xb − X′y = −X′(y − Xb) = −X′e = 0. (2.25)

12 2 Linear Regression Models, OLS, Assumptions and Properties

Therefore, following X′e = 0 we can derive a number of properties:

  1. The observed values of X are uncorrelated with the residuals. For every column of X, x′ ke = 0. In addition, if the regression includes a constant:
  2. The sum of the residuals is zero. x′ 1 e= i′e = ∑i ei = 0.
  3. The sample mean of the residuals is zero. ¯e = ∑i n^ e i= 0.
  4. The regression hyperplane passes through the means of the data. This follows from ¯e = 0. Recall that e = y − Xb. Dividing by n, we have ¯e = y¯ − xb¯. This implies that ¯y = x¯′b.
  5. The predicted values of y are uncorrelated with the residuals. yˆ′e = (Xb)′e = b′X′e = 0.
  6. The mean of the fitted values is equal to the mean of the actual values. Because y = yˆ + e. We have (^) ∑i ei = 0, then y¯ˆ = y¯.

2.3.3 Projection matrix

The matrix M (residual maker) is fundamental in regression analysis. It is given by:

M = I − X(X′X)−^1 X′. (2.26)

It generates the vector of least square residuals in a regression of y on X when it premultiplies any vector y. It can be easily derived from the least square residuals:

e = y − Xb (2.27) = y − X(X′X)−^1 X′y = (I − X(X′X)−^1 X′)y = My.

M is a symmetric (M = M′) and idempotent (M = M^2 ) n × n matrix. For example, it is useful to see that if we regress X on X we have a perfect fit and the residuals should be zero: MX = 0. (2.28) The projection matrix P is also a symmetric and idempotent matrix formed from X. When y is premultiplied by P, it results on the the fitted values yˆ in the regression of y on X. In is given by: P = X(X′X)−^1 X′. (2.29) It can be obtained by starting from the equation y = Xb + e. We know that yˆ = Xb, then y = yˆ + e that gives:

y ˆ = y − e (2.30) = y − My

14 2 Linear Regression Models, OLS, Assumptions and Properties

Fig. 2.3 Decomposition of yi, from [Greene (2008)].

Now, if we start with y = Xb + e and premultiply it by M^0 we obtain:

M^0 y = M^0 Xb + M^0 e (2.36)

Then, we transpose this equation to obtain:

y′M^0 = b′X′M^0 + e′M^0 (2.37)

Premultiply Equation 2.36 by Equation 2.37:

y′M^0 y = (b′X′M^0 + e′M^0 )(M^0 Xb + M^0 e) (2.38) = b′X′M^0 Xb + b′X′M^0 e + e′M^0 Xb + e′M^0 e = b′X′M^0 Xb + e′e.

The second term on the right-hand-side in the last line is zero because M^0 e = e and X′e = 0 , while the third term is zero because e′M^0 X = e′X = 0 (the regressors are orthogonal to the residuals). Equation 2.38 show the decomposition of the total sum of squares into regression sum of squares plus the error sum of squares:

SST = SSR + SSE (2.39)

2.4 Properties of OLS 15

If we calculate the fraction of the total variation in y that is explained by the model, we are talking about the coefficient of determination, R^2 :

R^2 =

SSR

SST

b′X′M^0 Xb y′M^0 y

e′e y′M^0 y

As we include variables into the model the R^2 will never decrease. Hence, for small samples, a better measure of fit is the adjusted R^2 or ¯R^2 :

R¯^2 = 1 − e

′e/(n − K) y′M^0 y/(n − 1 )

2.4 Properties of OLS

2.4.1 Unbiasedness

The least square estimator b is unbiased for every value of n.

b = (X′X) − 1 X′y (2.42) = (X′X)−^1 X′(Xβ + ε) = β + (X′X)−^1 X′ε E[b|X] = β + E[(X′X) − 1 X′ε] = β.

The second term after taking expectations is zero because the errors are assumed to be orthogonal to the regression residuals.

2.4.2 Variance and the Gauss-Markov Theorem

It is relatively simple to derive the sampling variance of the OLS estimators. How- ever, the key assumption in the derivation is that the matrix X is constant. If X is not constant, then the expectations should be taken conditional on the observed X. From the derivation of the unbiasedness of OLS we have that b − β = (X′X)−^1 X′ε. Using this in the variance-covariance matrix of the OLS we have:

Var[b|X] = E[(b − β )(b − β )′|X] = E[((X′X) − 1 X′ε)((X′X) − 1 X′ε)′|X] = E[((X′X)−^1 X′ε)(ε′X(X′X)−^1 )|X] = (X′X)−^1 X′E[εε′|X]X(X′X)−^1

2.4 Properties of OLS 17

s^2 = e′e n − K

Hence, the standard errors of the estimators b can be obtained by first obtaining an estimate of σ 2 using Equation 2.46 and then plugging s^2 into Equation 2.43.

2.4.4 Statistical Inference

Given that b is a linear function of ε, if ε has a multivariate normal distribution we have that: b|X ∼ N[β , σ 2 (X′X)−^1 ]. (2.47)

2.4.4.1 Hypothesis Testing

Assuming normality conditional on X and with Skk^ being the kth diagonal element of X’X−^1 we have that:

zk = bk − βk √ σ 2 Skk^

has a standard normal distribution. However, σ 2 is an unknown population parame- ter. Hence, we use:

tk =

bk − βk √ s^2 Skk^

that has a t distribution with (n − K) degrees of freedom. We use Equation 2.49 for hypotheses testing about the elements of β.

2.4.4.2 Confidence Intervals

Based on Equation 2.49 we can obtain the (1 − α) confidence interval for the popu- lation parameter βk using:

P(bk − tα/ 2 ,n−K sbk ≤ βk ≤ bk + tα/ 2 ,n−K sbk ) = 1 − α. (2.50)

What this equation is saying is that the true population parameter βk will lie between the lower confidence interval bk −tα/ 2 ,n−K sbk and the upper confidence interval bk + tα/ 2 ,n−K sbk in (1 − α)% of the times. Moreover, tα/ 2 ,n−K is the critical value from the t distribution with (n − K) degrees of freedom. This is illustrated in Figure 2.4.

18 2 Linear Regression Models, OLS, Assumptions and Properties









စ ဆ ဇ ဈ ဉ တ ထ ဒ ဓ

Fig. 2.4 Confidence Intervals.

References

[Dougherty (2007)] Dougherty, C., 2007. Introduction to Econometrics. 3rd ed. New York: Ox- ford University Press. [Greene (2008)] Greene, W.H. 2008. Econometric Analysis. 6th ed. New Jersey: Pearson Prentice Hall. [Wooldridge (2009)] Wooldridge, J.M., 2009. Introductory Econometrics: A Models Approach. 4th ed. New York: South-Western Publishers.