Multiple regression
Multiple regression
Example
• Suppose, wage is determined by two explanatory
variables education and experience, and other • The assumption 𝐸 𝑢 𝑥 , 𝑥 , … , 𝑥 = 0 means that
unobservable factors which are contained in 𝑢. all factors in the unobserved error term be
𝑤𝑎𝑔𝑒 = 𝛽 + 𝛽 𝑒𝑑𝑢𝑐 + 𝛽 𝑒𝑥𝑝𝑒𝑟 + 𝑢 uncorrelated with the explanatory variables.
Exercise • If there is any problem that causes 𝑢 to be correlated
Can you write the zero conditional mean assumption for with any of the explanatory variables, the above
the wage example? assumption fails to hold.
Ans: Education and experience are independent of 𝑢, • This in turn will generate bias in the parameters.
𝐸 𝑢|𝑒𝑑𝑢𝑐, 𝑒𝑥𝑝𝑒𝑟 = 0
This means that other factors affecting wage are not
related to education and experience, on average.
3 5
7/12/2024
Mechanics of obtaining the OLS estimates Interpretation of the OLS regression equation
• The estimated model is 𝑦 = 𝛽 + 𝛽 𝑥 + 𝛽 𝑥
• The estimated model with two explanatory variable • The intercept, 𝛽 indicates the predicted value of 𝑦
variables is written as 𝑦 = 𝛽 + 𝛽 𝑥 + 𝛽 𝑥 when 𝑥 = 0 and 𝑥 = 0.
• This is also called sample regression function or • The estimates 𝛽 and 𝛽 measure the partial effect and
regression line. has ceteris paribus interpretation.
• These estimates are obtained through ordinary least • When 𝑥 is held fixed i.e. ∆𝑥 = 0, we get the
predicted change in 𝑦 when 𝑥 changes as ∆𝑦 = 𝛽 ∆𝑥
squares (OLS) method. The OLS method chooses the
estimates to minimize the sum of squared residuals. • When 𝑥 is held fixed i.e. ∆𝑥 = 0, we get the predicted
change in 𝑦 when 𝑥 changes as ∆𝑦 = 𝛽 ∆𝑥
6 8
10 12
15 17
OLS fitted values and residuals • Normally, the actual value of the dependent variable
for any observation will not equal the predicted
• After estimating the OLS regression, value i.e. 𝑦 ≠ 𝑦
𝑦 = 𝛽 +𝛽 𝑥 + 𝛽 𝑥 +⋯+ 𝛽 𝑥 • The difference between observed value of the
dependent variable 𝑦 and the predicted value of the
• We can obtain a fitted value or predicted value for dependent variable 𝑦 is residual for observation-i.
each observation.
𝑢 =𝑦 −𝑦
• For observation- i, the fitted value is
• If 𝑢 > 0, it means that 𝑦 is less than 𝑦 i.e. 𝑦 is
𝑦 = 𝛽 + 𝛽 𝑥 +𝛽 𝑥 + ⋯+𝛽 𝑥 under-predicted.
• If 𝑢 < 0, it means that 𝑦 is greater than 𝑦 i.e. 𝑦 is
over-predicted.
16 18
7/12/2024
Properties of OLS fitted values and residuals By definition, 𝑆𝑆𝑇 = 𝑆𝑆𝐸 + 𝑆𝑆𝑅
1= +
• The sample average of the residuals is zero, so 𝑦 = 𝑦.
• The sample covariance between each independent 1=𝑅 +
variable and the OLS residuals is zero. 𝑅 =1−
• Consequently the sample covariance between OLS • 𝑅2 is interpreted as the proportion of the sample
fitted value and OLS residual is zero. variation in the dependent variable, that is explained
• The point 𝑥̅ , 𝑥̅ , … , 𝑥̅ , 𝑦 is always on the regression by the OLS regression line.
line. Since 𝑦 = 𝑦 • 𝑅2 is a number, and it ranges between 0 and 1.
𝑦 = 𝛽 + 𝛽 𝑥̅ + 𝛽 𝑥̅ + ⋯ + 𝛽 𝑥̅ • An important feature of 𝑅2 is that it never decreases
and usually increases when another independent
variable is added to a regression.
19 21
Goodness of fit
• The sum of the squared residuals never increases
• Goodness of fit of an OLS regression model is when additional regressors are added to the model.
denoted by R2 and it is computed as
• The fact that R2 never decreases makes it a poor
𝑅 = = tool for deciding whether another variables should
be added to a model.
Where,
• Whether or not another variable should be
• Total sum of squares, 𝑆𝑆𝑇 = ∑ 𝑦 −𝑦
included in the model should be determined by
• Explained sum of squares, 𝑆𝑆𝐸 = ∑ 𝑦 −𝑦 examining the respective partial effect i.e. whether
• Residuals sum of squares, 𝑆𝑆𝑅 = ∑ 𝑢 the partial effect on 𝑦 is non-zero.
20 22
7/12/2024
23 25
Adjusted R2
• 𝑅 = 1− 1−𝑅
• Adjusted R2 imposes a penalty for adding additional • Remember, if we add a new independent variable to
independent variable to a model. a regression, adjusted 𝑅2 increases if and only if the
• Can adjusted R2 be negative? t-statistic on the new variable is greater than 1 in
Exercise absolute value.
Suppose for an estimated model R2=0.10, n=51, k=10.
Compute the adjusted R2.
• 𝑅 = −0.125
• Note: A negative 𝑅 indicates a very poor fit.
24 26
7/12/2024
27 29
31 33
32 34
7/12/2024
35 37
36 38
7/12/2024
Because of unavailability of data on 𝑥 , we exclude it • But when 𝑥1 and 𝑥2 are correlated, 𝛿 has the same
sign as the correlation between 𝑥1 and 𝑥2. This means
from the regression model and estimate
Telda 𝛿 > 0 if 𝑥1 and 𝑥2 are positively correlated.
𝑦 =𝛽 +𝛽 𝑥
𝛿 < 0 if 𝑥1 and 𝑥2 are negatively correlated.
• What happens to the unbiasedness of 𝛽 ?
• The sign of the bias depends on the sign of 𝛿 and 2
The partial effect of 𝑥 i.e., 𝛽 now contains effect of
𝛿 >0 𝛿 <0
the omitted variable as 𝛽 = 𝛽 + 𝛽 𝛿
2 > 0 Positive bias Negative bias
Where 𝛿 is the slope coefficient of regression of
2 < 0 Negative bias Positive bias
𝑥 on 𝑥 . Thus it can be seen that 𝛽 differs from 𝛽 by
(i) the term partial effect of 𝑥 on 𝑦 and • The size of the bias is determined by 𝛽 and 𝛿 .
(ii) the slope of the regression of 𝑥 on 𝑥 . • A small bias of either sign need not be a cause of
concern.
39 41
𝛿 is constant
(nonrandom) in
𝐸 𝛽 =𝐸 𝛽 +𝛽 𝛿 a given sample • 𝛽 is a population parameter which is unknown so it
=𝐸 𝛽 +𝐸 𝛽 𝛿 is difficult to be sure of the sign of 𝛽 . But we can
guess about the direction of 𝛽 .
=𝛽 +𝛽 𝛿
• 𝛿 cannot be computed when 𝑥 is unobservable and
• Bias in 𝛽 = 𝐸 𝛽 −𝛽 =𝛽 𝛿 accordingly sign of 𝛿 cannot be known. But again we
This is called omitted variable bias. can have an understanding about the direction of
relationship between 𝑥 and 𝑥 .
• The above bias can be zero if 𝛽 = 0 or 𝛿 = 0.
43 45
44 46
7/12/2024
Example
• Consider a model
Total sample variation, 𝑆𝑆𝑇 = ∑ 𝑥 − 𝑥̅
𝑤𝑎𝑔𝑒 = 𝛽 + 𝛽 𝑒𝑑𝑢𝑐 + 𝛽 𝑒𝑥𝑝𝑒𝑟 + 𝛽 𝑡𝑒𝑛𝑢𝑟𝑒 + 𝑢
• Homoskedasticity assumption requires that the
variance of the unobserved error 𝑢 does not depend • The larger the total variation in 𝑥𝑗, the smaller is the
on the levels of education, experience, or tenure. variance of the OLS estimator. Therefore more
variation of 𝑥𝑗 in the sample is preferable.
𝑣𝑎𝑟 𝑢|𝑒𝑑𝑢𝑐, 𝑒𝑥𝑝𝑒𝑟, 𝑡𝑒𝑛𝑢𝑟𝑒 = 𝜎
• One way of increasing sampling variation is to
• If this variance changes with any of the three increase size of the sample. SST tends to be large
explanatory variables, then heteroskedasticity is when sample size increases.
present.
48 50
7/12/2024
Note:
• For true model: 𝑣𝑎𝑟 𝛽 = ∑
The linear relationships among the independent 𝜎 =
variables, 𝑅 • For mis-specified model: 𝑣𝑎𝑟 𝛽 =
51 53
52 54
7/12/2024