Docsity

Classical Linear Regression Model: Assumptions and Properties, Lecture notes of Statistics

Partial preview of the text

Download Classical Linear Regression Model: Assumptions and Properties and more Lecture notes Statistics in PDF only on Docsity!

The Classical Linear Regression Model

ME104: Linear Regression Analysis

Kenneth Benoit

August 14, 2012

CLRM: Basic Assumptions

  1. Specification:

I Relationship between X and Y in the population is linear:

E(Y ) = X β

I No extraneous variables in X

I No omitted independent variables

I Parameters (β) are constant

2. E() = 0

  1. Error terms:

I (^) Var() = σ

2 , or homoskedastic errors

I (^) E(r i ,j

) = 0, or no auto-correlation

Normally distributed errors

Ordinary Least Squares (OLS)

I (^) Objective: minimize

e

2

i

(Y

i

Y

i

2 , where

I (^) Yˆ i

= b 0

  • b 1

X i

I error ei = (Yi −

ˆ Yi )

b =

(Xi −

X )(Yi −

Y )

(X

i

X )

X

i

Y

i

∑

X

2

i

I (^) The intercept is: b 0 =

Y − b 1

X

OLS in matrix notation

I (^) Formula for coefficient β:

Y = X β + 

X

′ Y = X

′ X β + X

′ 

X

′

Y = X

′

X β + 0

(X

′ X )

− 1 X

′ Y = β + 0

β = (X

′

X )

− 1

X

′

Y

I Formula for variance-covariance matrix: σ

2 (X

′ X )

− 1

I In simple case where y = β 0 + β 1 ∗ x, this gives

σ

2 /

∑

(x i

− ¯x)

2 for the variance of β 1

I (^) Note how increasing the variation in X will reduce the variance

of β 1

The “hat” matrix

I (^) The hat matrix H is defined as:

β = (X

′

X )

− 1

X

′

y

X

β = X (X

′ X )

− 1 X

′ y

y ˆ = Hy

I H = X (X

′ X )

− 1 X

′ is called the hat-matrix

I (^) Other important quantities, such as ˆy ,

e

2

i

(RSS) can be

expressed as functions of H

I (^) Corrections for heteroskedastic errors (“robust” standard

errors) involve manipulating H

Sums of squares (ANOVA)

TSS Total sum of squares

(Y

i

Y )

2

SSM Model or Regression sum of squares

( ˆY

i

Y )

2

SSE Error or Residual sum of squares

∑

e

2

i

Y

i

− Y

i

2

The key to remember is that TSS = SSM + SSE

R

2

I (^) Solid arrow: variation in y when X is unknown (TSS Total Sum of

Squares

∑

(yi − ¯y )

2 )

I (^) Dashed arrow: variation in y when X is known (SSM Model Sum of

Squares

∑

(ˆyi − ¯y )

2 )

R

2

I (^) A much over-used statistic: it may not be what we are

interested in at all

I Interpretation: the proportion of the variation in y that is

explained linearly by the independent variables

R

2

SSM

TSS

SSE

TSS

(y i

− yˆ i

2

(y i

− y¯ )

2

I (^) Alternatively, R

2 is the squared correlation coefficient between

y and ˆy

R

2

continued

I (^) When a model has no intercept, it is possible for R

2 to lie

outside the interval (0, 1)

I R

2 rises with the addition of more explanatory variables. For

this reason we often report “adjusted R

2 ”: 1 − (1 − R

2 )

n− 1

n−k− 1

where k is the total number of regressors in the linear model

(excluding the constant)

I (^) Whether R

2 is high or not depends a lot on the overall

variance in Y

I (^) To R

2 values from different Y samples cannot be compared

R

2

decomposed

y = ˆy + 

Var(y ) = Var(ˆy ) + Var(e) + 2Cov(ˆy , e)

Var(y ) = Var(ˆy ) + Var(e) + 0

(y i

− y¯ )

2 /N =

(ˆy i

ˆy )

2 /N +

(e i

− ˆe)

2 /N

(yi − y¯ )

2

=

(ˆyi −

ˆy )

2

(ei − ˆe)

2

(y i

− y¯ )

2

(ˆy i

ˆy )

2

e

2

i

SST = SSR + SSE

SST /SST = SSR/SST + SSE /SST

1 = R

2

  • unexplained variance

Regression “terminology”

I (^) y is the dependent variable

I referred to also (by Greene) as a regressand

I X are the independent variables

I also known as explanatory variables

I (^) also known as regressors

I y is regressed on X

I (^) The error term  is sometimes called a disturbance

Some important OLS properties (cont.)

I (^) If the observations are expressed as deviations from their

means, y ∗ = y − y¯ and x

∗ = x − ¯x, then β =

x

∗ y

∗ /

x

∗ 2

I (^) The intercept can be estimated as ¯y − β¯x. This implies that

the intercept is estimated by the value that causes the sum of

the OLS residuals to equal zero.

I The mean of the ˆy values equals the mean y values – together

with previous properties, implies that the OLS regression line

passes through the overall mean of the data points

OLS in Stata

. use dail

(Ireland 2002 Dail Election - Candidate Spending Data)

. gen spendXinc = spend_total * incumb

(2 missing values generated)

. reg votes1st spend_total incumb minister spendXinc

Source | SS df MS Number of obs = 462

-------------+------------------------------ F( 4, 457) = 229.

Model | 2.9549e+09 4 738728297 Prob > F = 0.

Residual | 1.4739e+09 457 3225201.58 R-squared = 0.

-------------+------------------------------ Adj R-squared = 0.

Total | 4.4288e+09 461 9607007.17 Root MSE = 1795.

votes1st | Coef. Std. Err. t P>|t| [95% Conf. Interval]

-------------+----------------------------------------------------------------

spend_total | .2033637 .0114807 17.71 0.000 .1808021.

incumb | 5150.758 536.3686 9.60 0.000 4096.704 6204.

minister | 1260.001 474.9661 2.65 0.008 326.613 2193.

spendXinc | -.1490399 .0274584 -5.43 0.000 -.2030003 -.

_cons | 469.3744 161.5464 2.91 0.004 151.9086 786.