Econometrics 1 Handbook 1
Econometrics 1 Handbook 1
Innocent Makuta
University of Malawi
Department of Economics
Contents
Introduction
Methodology of Econometrics
Types/Structures of economic data
Question
How would you...?
Test the law of demand for maize in Malawi(price and quantity
demanded)?
Estimate the consumption function (income and consumption
expenditure)?
Estimate the inflation function for Malawi (money supply and
inflation rate)?
Evaluate the effectiveness of FISP on crop production?
Evaluate the effectiveness of an advertising campaign on sales
revenues?
Question
How would you...?
Test the law of demand for maize in Malawi(price and quantity
demanded)?
Estimate the consumption function (income and consumption
expenditure)?
Estimate the inflation function for Malawi (money supply and
inflation rate)?
Evaluate the effectiveness of FISP on crop production?
Evaluate the effectiveness of an advertising campaign on sales
revenues?
Answer
ECONOMETRICS
What is Econometrics?
Literally, Econometrics means ”economic measurement”
Economentrics involves the use of statistical tools to:
(i) test (validate) economic theories
(ii) estimate economic relationships
(iii) evaluate government and business policies
Econometrics forms the bridge between economic theory and the real
world.
Y = α + βX + u
Obtaining data
Data in collected in order to allow for estimation of the parameters of
the econometric model
Data is usually collected from a sample (not entire population)
through surveys
Hypothesis testing
This involves confirmation or refutation of the theory or hypothesis in
step 1 on the basis of the estimates obtained in step 5
Hypothesis testing involves use of inferential statistical tools such as
confidence interval method or test-of-significance method
Prediction or Forecasting
Here, we use the model to
predict the future value(s) of the dependent, or forecast, variable Y
on the basis of known or expected future value(s) of the independent,
or predictor, variable X
Cross-sectional data:
This is data collected on one or variables collected from several
observation units (households, firms, countries) at the same point
in time
Time series data:
This is data collected on one or variables collected from a particular
observation unit at different times
The data is collected at regular time intervals e.g. daily, weekly,
monthly, quarterly, annually etc
Panel (or Longitudinal) data:
This is data collected on one or variables collected from several
observation units (households, firms, countries) over time
Panel has both cross-sectional and time series components
Innocent Makuta
University of Malawi
Department of Economics
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 1 / 136
CONTENTS
Simple Regression
Extensions to Simple Regression
Multiple Regression
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 2 / 136
SIMPLE REGRESSION
Contents
Definition of Regression Analysis
Population regression line
Population regression function
Sample regression function
Point Estimation: Least Squares
Numerical Properties Least Squares Estimators
Assumptions
Statistical Properties Least Squares
Gauss-Markov Theorem
Coefficient of Determination
Point Estimation: Maximum Likelihood
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 3 / 136
REGRESSION ANALYSIS
X ⇒ Independent variable
Y ⇒ Dependent variable
E (Y |X )
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 4 / 136
ILLUSTRATION
Suppose that one collects the following consumption(Y) and income (X)
from 27 households
Income(X) Consumption(Y)
400 370 375 375 380 380 380 385 385 390
500 440 445 445 450 450 450 455 455 460
600 520 525 525 530 530 530 535 535 540
E (Y ) = 450
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 5 / 136
ILLUSTRATION
Income Consumption E (Y |X )
400 370 375 375 380 380 380 385 385 390 380
500 440 445 445 450 450 450 455 455 460 450
600 520 525 525 530 530 530 535 535 540 530
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 6 / 136
POPULATION REGRESSION LINE (PRL)
The PRL is the line connecting all the conditional means of the dependent
variable E (Y |X )
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 7 / 136
POPULATION REGRESSION FUNCTION (PRF)
E (Y |Xi ) = f (Xi )
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 8 / 136
POPULATION REGRESSION FUNCTION (PRF)
E (Y |Xi ) = β0 + β1 Xi
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 9 / 136
POPULATION REGRESSION FUNCTION (PRF)
Yi = E (Y |Xi ) + ui = β0 + β1 Xi + ui
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 10 / 136
Importance of the Error Term
Vagueness of theory
Unavailability of data
Peripheral variables
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 11 / 136
SAMPLE REGRESSION FUNCTION
where:
Ybi is the estimator of E (Y |Xi )
βb0 is the estimator of β0
βb1 is the estimator of β1
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 12 / 136
SAMPLE REGRESSION FUNCTION
The stochastic form of the Sample Regression Function (SRF) may written
as:
Yi = Ybi + ubi = βb0 + βb1 Xi + ubi
where:
ubi is the estimator of E (ui )
ubi is known as the residual
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 13 / 136
TERMINOLOGY
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 14 / 136
ESTIMATION
Yi = E (Y |Xi ) + ui = β0 + β1 Xi + ui
Methods of Estimation
1 Least Squares
2 Maximum Likelihood
3 Method of Moments
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 15 / 136
ORDINARY LEAST SQUARES (OLS)
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 16 / 136
ORDINARY LEAST SQUARES (OLS)
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 17 / 136
ORDINARY LEAST SQUARES (OLS)
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 18 / 136
Derivation of the expression for βb0 and βb1
Yi = E (Y |Xi ) + ui = β0 + β1 Xi + ui (1)
on the basis of the SRF
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 19 / 136
Derivation of the expression for βb0 and βb1
ubi 2
P
∂ X X
=2 Yi − βb0 − βb1 Xi (−1) = −2 Yi − βb0 − βb1 Xi (5)
∂ βb0
ubi 2
P
∂ X X
=2 Yi − βb0 − βb1 Xi (−Xi ) = −2 Yi − βb0 − βb1 Xi (Xi )
∂ βb1
(6)
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 20 / 136
Derivation of the expression for βb0 and βb1
Setting the partial derivatives in equations (5) and (6) equal to zero above
yield the following FOCs (also called normal equations)
X
−2 Yi − βb0 − βb1 Xi = 0
X X
⇒ Yi = nβb0 + βb1 Xi (7)
X
−2 Yi − βb0 − βb1 Xi (Xi ) = 0
X X X
⇒ Yi Xi = βb0 Xi + βb1 Xi 2 (8)
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 21 / 136
Derivation of the expression for βb0 and βb1
P P P
n Xi Yi − Xi Yi
βb1 = P 2 P 2
(a)
n Xi − ( Xi )
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 22 / 136
Derivation of the expression for βb0 and βb1
Recall that:
P P
X X Xi Yi
(Xi − X )(Yi − Y ) = Xi Yi −
n
and
( Xi )2
X X P
(Xi − X )2 = Xi 2 −
n
Therefore:
P P
P Xi Yi
P
(Xi − X )(Yi − Y ) Xi Yi −
= n
(Xi − X )2 P 2 ( Xi )2
P P
Xi −
P Pn P
n Xi Yi − Xi Yi
= P 2 P 2
n Xi − ( Xi )
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 23 / 136
Derivation of the expression for βb0 and βb1
Hence
P P P
n Xi Yi − Xi Yi
βb1 = P 2 P 2
(a)
n Xi − ( Xi )
P
(Xi − X )(Yi − Y )
= (b)
(Xi − X )2
P
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 24 / 136
Derivation of the expression for βb0 and βb1
Since the value of βb1 is now known, we can substitute this value into (7)
X X
Yi = nβb0 + βb1 Xi
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 25 / 136
OLS technique: An Example
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 26 / 136
Derivation of the expression for βb0 and βb1
βb1 can alternatively be expressed as follows:
P
xi yi
β1 = P 2
b
xi
P
xi Yi − Y
= P 2
xi
P P
xi Yi − Y xi
= P 2
xi
P
xi Yi
= P 2
xi
ybi = βb1 xi
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 28 / 136
PROPERTIES OF OLS ESTIMATORS
Numerical/algebraic properties
Sample-level properties
Assumption-free
Statistical properties
Population-level properties
Assumption-dependent
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 29 / 136
NUMERICAL PROPERTIES OF OLS ESTIMATORS
Property 1: The regression line passes through the sample means of X
and Y (X , Y )
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 30 / 136
NUMERICAL PROPERTIES OF OLS ESTIMATORS
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 31 / 136
NUMERICAL PROPERTIES OF OLS ESTIMATORS
Property 3: The mean value of the residuals is zero
X
ubi = ub = 0
Proof
X X
ubi = Yi − βb0 − βb1 Xi
Xh i
= Yi − Y − β1 X − β1 Xi
b b
X X
= Yi − Y + βb1 Xi − X
=0
And so,
P
ubi 0
ub = = =0
n n
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 32 / 136
NUMERICAL PROPERTIES OF OLS ESTIMATORS
Property 4: The residuals are uncorrelated with the predicted Ys
X X
ubi ybi = ubi Ybi = 0
Proof
X X
ubi ybi = (yi − ybi ) ybi
X
= yi − βb1 xi βb1 xi
X 2X 2
= βb1 xi yi − βb1 xi
xi yi 2 X 2
P X P
xi yi
= P 2 xi yi − P 2 xi
xi xi
( xi yi )2 ( xi yi )2
P P
= P 2 − P 2
xi xi
=0
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 33 / 136
NUMERICAL PROPERTIES OF OLS ESTIMATORS
Now
X X
ubi ybi = ubi Ybi − Y
X X
= ubi Ybi − Y ubi
X
= ubi Ybi
Therefore X X
ubi ybi = 0 ⇒ ubi Ybi = 0
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 34 / 136
NUMERICAL PROPERTIES OF OLS ESTIMATORS
Property 5: The residuals are uncorrelated with the explanatory variable
X X
ubi xi = ubi Xi = 0
Proof
X X
ubi xi = (yi − ybi ) xi
X
= yi − βb1 xi xi
X X
= xi yi − βb1 xi2
P
X xi yi X 2
= xi yi − P 2 xi
xi
X X
= xi yi − xi yi
=0
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 35 / 136
ASSUMPTIONS
Yi = β0 + β1 Xi + ui (1)
Yi = β0 + β1 Xi + β1 Xi2 + ui (2)
lnYi = β0 + β1 lnXi + ui (3)
1
Yi = β0 + Xi + ui (4)
β1
1
Yi = + ui (5)
β0 + β1 Xi
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 36 / 136
ASSUMPTIONS
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 37 / 136
ASSUMPTIONS
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 38 / 136
ASSUMPTIONS
Assumption 4: Homoskedasticity
The error has a constant variance for every given value X
Notation
Implication:
All Y values corresponding to the different levels of the X values are
equally reliable and therefore equally important
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 39 / 136
ASSUMPTIONS
Figure: Homoskedasticity
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 40 / 136
ASSUMPTIONS
Figure: Heterokedasticity
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 41 / 136
ASSUMPTIONS
cov (ui , uj |Xi , Xj ) = E {[ui − E (ui |Xi )|Xi ] [uj − E (uj |Xj )|Xj ]}
= E (ui |Xi )(uj |Xj ) since E (ui |Xi ) = E (uj |Xj ) = 0
= E (ui uj )
Implication:
There is no systematic effect of excluded variables (and therefore
subsumed in the error term) on Y as a result of possible associations
among the errors
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 42 / 136
ASSUMPTIONS
cov (ui , Xi ) = E {[ui − E (ui |Xi )|Xi ] [Xi − E (Xi |Xi )|Xi ]}
= E {ui [Xi − E (Xi )]}
= E (ui Xi ) − E (Xi )E (ui )
= E (ui Xi )
Implication
The effect of X on Y can be assessed independently of the ommitted
variables and therefore subsumed in the error term)
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 43 / 136
ASSUMPTIONS
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 44 / 136
ASSUMPTIONS
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 45 / 136
ASSUMPTIONS
Assumption 9: Normality
The error term is normally distributed. Combined with assumptions 3 and
4, we have that:
ui ∼ N(0, σ 2 )
Adding assumption 5, it means the errors are normally and independently
distributed (NID)
ui ∼ NID(0, σ 2 )
Justification for assuming Normality
Central Limit Theorem (CLT)
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 46 / 136
ASSUMPTIONS
Assumption 9: Normality
Consequences of assuming Normality
Yi is normally distributed
Recall:
Yi = β0 + β1 Xi + ui
Yi = f (ui )
Yi ∼ N β0 + β1 Xi , σ 2
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 47 / 136
ASSUMPTIONS
Assumption 9: Normality
Consequences of assuming Normality
βb1 is normally distributed
Recall:
X
βb1 = wi Yi
X
= wi (β0 + β1 Xi + ui )
βb1 = f (ui )
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 48 / 136
ASSUMPTIONS
Assumption 9: Normality
Consequences of assuming Normality
βb0 is normally distributed
Recall:
βb0 = Y − βb1 X
βb0 = f (βb1 )
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 49 / 136
STATISTICAL PROPERTIES OF ESTIMATORS
Asymptotic properties
Consistency
Asymptotic normality
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 50 / 136
Unbiasedness
bias(θ) b −θ
b = E (θ)
When the mean value of the estimator is equal to the true value of
the parameter, the estimator is said to be unbiased
Unbiasedness ⇒ E (θ)
b =θ
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 51 / 136
Unbiasedness
θb1 is unbiased
θb2 is biased
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 52 / 136
Minimum Variance
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 53 / 136
Minimum Variance
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 54 / 136
Consistency
More formally
plim θb1 = θ
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 55 / 136
Consistency
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 56 / 136
STATISTICAL PROPERTIES OF OLS ESTIMATORS
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 57 / 136
Finite Sample Statistical properties
Property: Linearity
Recall that
X xi
βb1 = wi Yi where wi = P 2
xi
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 58 / 136
Finite Sample Statistical properties
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 59 / 136
Unbiasedness of OLS estimators
E (βb1 ) = β1
Proof
P P
xi yi xi Yi X
β1 = P 2 = P 2 =
b wi Yi
xi xi
X
= wi (β0 + β1 Xi + ui )
X X X
= β0 wi + β1 wi Xi + wi ui
X
= β1 + wi ui
P
βb1 = β1 + wi ui
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 60 / 136
Unbiasedness of OLS estimators
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 61 / 136
VARIANCE OF OLS ESTIMATORS
X σ2
var (βb1 ) = var (βb1 |Xi ) = σ 2 wi2 = P 2
xi
Proof
h i2
var (βb1 |Xi ) = E βb1 − E (βb1 |Xi )|Xi
h i2
= E βb1 − β1 |Xi
hX i2
=E wi ui |Xi
= E [(w1 u1 + w2 u2 + ... + wn un ) (w1 u1 + w2 u2 + ... + wn un ) |Xi ]2
= E w1 2 u1 2 + E w2 2 u2 2 + ... + E wn 2 un 2
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 62 / 136
VARIANCE OF OLS ESTIMATORS
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 63 / 136
ESTIMATOR OF σ 2
σ 2 is unobservable since we don’t have information from the entire
population.
Given the simple regression
Yi = βb0 + βb1 Xi + ubi
unbiased estimator of σ 2 is:
ubi 2
P
2
σ
b =
n−2
Generalisation: Given the regression
Yi = βb0 + βb1 X1i + βb2 X2i + ... + βbk−1 Xk−1,i + ubi
unbiased estimator of σ 2 is:
ubi 2
P
b2 =
σ
n−k
where k is the number of parameters in the regression model
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 64 / 136
GAUSS-MARKOV (GM) THEOREM
Gauss-Markov Theorem
Given the assumptions of classical linear regression model, the least
squares estimators have the minimum variance in a class of all linear
and unbiased estimators
That is, least squares estimators are BLUE (Best among Linear
Unbiased Estimators).
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 65 / 136
GAUSS-MARKOV (GM) THEOREM
Proof
Recall that the OLS estimator for β1 is
X
βb1 = wi Yi
where wi P
are the least squares weights
˜
Let β1 = ai Yi be another linear estimator where the weight wi is
ai = wi + bi
That is,
X X
β˜1 = ai Yi = ai Yi
X
= ai (β0 + β1 Xi + ui )
X X X
= β0 ai + β1 ai Xi + ai ui
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 66 / 136
GAUSS-MARKOV (GM) THEOREM
In this case,
X X X X
β˜1 = β0 ai + β1 ai Xi + ai ui = β1 + ai u i
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 67 / 136
GAUSS-MARKOV (GM) THEOREM
Now
X X XX
ai = 0 ⇒ (wi + bi ) =
wi + bi = 0
X X
⇒ bi = 0 since wi = 0
and
X X X X
ai Xi = 1 ⇒ (wi + bi )Xi =wi Xi + bi Xi = 0
X X
⇒ bi Xi = 0 since wi Xi = 1
and
X X X X X
ai2 = 0 ⇒ (wi + bi )2 = wi2 + bi2 + 2 wi bi
x
P i 2 bi
X X X
⇒ wi2 + bi2 + 2
xi
X X
2 2
⇒ wi + bi
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 68 / 136
GAUSS-MARKOV (GM) THEOREM
Now, the variance of β˜1 is given by
h i2 h i2
var (β˜1 |Xi ) = E β˜1 − E (β˜1 |Xi )|Xi = E β˜1 − β1 |Xi
hX i2
=E ai ui |Xi
And so
X
var (β˜1 |Xi ) ≥ var (βb1 |Xi ) since σ 2 bi2 ≥ 0
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 69 / 136
Consistency
plim βb1 = β1
Proof
X
βb1 = β1 + wi ui
P
(Xi − X )(ui − u) /n
P
xi ui
= β1 + P 2 = β1 + P
xi (Xi − X )2 /n
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 71 / 136
COEFFICIENT OF DETERMINATION
Recall:
where:
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 72 / 136
COEFFICIENT OF DETERMINATION
Now,
ESS RSS
r2 = =1− (1)
TSS TSS
P 2
ybi
= P 2 (2)
yi
2P 2 P 2
βb1 xbi 2 x
= P 2 = βb1 P i2 (3)
yi y
2 i
2 Sx2
P
2 x i /(n − 1)
= βb1 P 2 = βb1 (4)
yi /(n − 1) Sy2
( xi yi )2
P
= (5)
xi2 yi2
P P
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 73 / 136
COEFFICIENT OF CORRELATION
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 74 / 136
ANALYSIS OF VARIANCE
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 75 / 136
ANALYSIS OF VARIANCE
ANOVA table
Source SS df MSS=SS/df
P 2
βb2 x 2
P
Model ybi 1
P1 2 i
P 2 ubi
Residuals ubi n−2 b2
=σ
P 2 n−2
Total yi n−1
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 76 / 136
Maximum Likelihood Estimation
ui ∼ N(0, σ 2 )
Yi ∼ N(β0 + β1 Xi , σ 2 )
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 77 / 136
Maximum Likelihood Estimation
Fact
E (ui uj |Xi Xj ) = 0 for i 6= j implies that
E (Yi Yj |Xi Xj ) = 0
That is, if the errors are uncorrelated then the y ’s are also
uncorrelated
Therefore, each yi is normally and independently distributed
Yi ∼ NID(β0 + β1 Xi , σ 2 )
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 78 / 136
Maximum Likelihood Estimation
Given
Yi = β0 + β1 Xi + ui where Yi ∼ NID(β0 + β1 Xi , σ 2 ) (1)
then the probability density function (PDF) of Yi is
(Yi − β0 − β1 Xi )2
1
f (Yi ) = √ exp − (2)
πσ 2 2σ 2
Because the Yi are independent of each other, the joint PDF can be
written as
n
(Yi − β0 − β1 Xi )2
P
2 1
f (Y1 , Y2 , ..., Yn |β0 , β1 , σ ) = √ exp −
πσ 2 2σ 2
(3)
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 79 / 136
Maximum Likelihood Estimation
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 80 / 136
Maximum Likelihood Estimation
Taking the partial derivative of equation (5) wrt β˜0 , β˜1 and σ˜2
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 81 / 136
Maximum Likelihood Estimation
Setting the first partial derivatives in (6) and (7) equal to zero yields the
following normal equations
Important: Normal equations (9) and (10) are exactly the same as
those obtained under the OLS procedure
Therefore, under normality, ML estimators are identical to OLS
estimators
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 82 / 136
Maximum Likelihood Estimation
Setting the first partial derivatives in (8) equal to zero yields the following
normal equation
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 83 / 136
Extensions to the Simple Regression
Contents
Regression through the Origin
Functional forms
Scaling and Units of measurement
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 84 / 136
Regression through the Origin
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 85 / 136
Regression through the Origin
Given
Yi = β0 + β1 Xi + ui (1)
if β0 = 0, then we have a regression through the origin
Yi = β1 Xi + ui (2)
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 86 / 136
Derivation of the expression for βb1
Squaring and summing on both sides of equation (4), we have:
X X 2
ubi 2 = Yi − βb1 Xi (5)
P 2
Differentiating ubi wrt βb1 we obtain:
∂ ubi 2
P X X
=2 Yi − βb1 Xi (−Xi ) = −2 Yi − βb1 Xi (Xi ) (6)
∂ βb1
Setting the partial derivative in equation (6) equal to zero above yield the
following FOC (also called normal equation)
X
−2 Yi − βb1 Xi (Xi ) = 0
X X
⇒ Yi Xi = βb1 Xi 2 (7)
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 87 / 136
Derivation of the expression for βb1
P
Xi Yi
β1 = P 2
b (8a)
Xi
X Xi
= di Yi where di = P 2 (8b)
Xi
Important:
In the expression for βb1 , we use the RAW sums of squares and
cross-products
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 88 / 136
Regression through the Origin
Variance of βb1
We know that
X
βb1 = di Yi
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 89 / 136
Regression through the Origin
Property: the sum of the residuals is not equal to zero
X
ubi 6= 0
Proof (byP
contradiction)
Suppose ubi = 0, then summing on both sides of
Yi = βb1 Xi + ubi
gives
X X X X
Yi = βb1
Xi + ubi = βb1 Xi
P
Yi
∴ βb1 = P
Xi
This contradicts the fact that
P
Xi Yi
β1 = P 2
b
Xi
X
∴ ubi 6= 0
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 90 / 136
Regression through the Origin
Property: r 2 can be negative
Proof
Recall:
ESS
r2 =
TSS
RSS
=1−
TSS
P 2
ubi
=1− P 2
yi
P 2 b2 P 2
Y − β1 Xi
= 1 − Pi 2
Yi2 − nY
If
X 2 RSS
βb12 Xi2 < nY ⇒ RSS > TSS ⇒ > 1 ⇒ r2 < 0
TSS
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 91 / 136
Regression through the Origin
Caution:
Always use the conventional model with an intercept
If the intercept is included included in the model but turns out
insignificant(ie equal to zero), we have a regression through the origin
If infact the model has an intercept but we use a regression through
the origin, we would be committing a specification error
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 92 / 136
Functional Form
Types of models
Log-linear model
Semi-log model
Reciprocal model
Logarithmic reciprocal model
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 93 / 136
Log-linear model
Consider the following exponential model
Yi = β0 Xiβ1 e ui
dY /Y dY X
=
dX /X dX Y
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 94 / 136
Log-linear model
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 95 / 136
Log linear Model
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 96 / 136
Semi-log model
Log-lin model
A log-lin model has the form
lnYi = β0 + β1 Xi + ui
dlnYi (dY /Y ) dY 1
β1 = = =
dXi dX dX Y
That is, the slope coefficient of the log-lin model (β1 ) measures
relative (proportional) change in Y for a given absolute change in the
value of X
In a log-lin model, β1 must be multiplied by 100 (to get growth rate)
before being interpreted
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 97 / 136
Log-lin Model
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 98 / 136
Semi-log model
Lin-Log model
A lin-log model has the form
Yi = β0 + β1 lnXi + ui
That is, the slope coefficient of the lin-log model (β1 ) measures
absolute change in Y for a given relative (proportional) change in the
value of X
In a lin-log model, β1 must be multiplied by 0.01 (divided by 100)
before being interpreted
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 99 / 136
Lin log Model
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 100 / 136
Choice of functional form
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 101 / 136
Multiple Regression
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 102 / 136
Interpretation of partial regression coefficients
Yi = β0 + β1 X1i + β2 X2i + ui
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 103 / 136
Derivation of the expression for βb0 , βb1 and βb2
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 104 / 136
Derivation of the expression for βb0 , βb1 and βb2
ubi 2 partially wrt βb0 , βb1 and βb2 we obtain:
P
Differentiating
ubi 2
P
∂ X
=2 Yi − βb0 − βb1 X1i − βb2 X2i (−1)
∂ βb0
X
= −2 Yi − βb0 − βb1 X1i − βb2 X2i (5)
∂ ubi 2
P X
=2 Yi − βb0 − βb1 X1i − βb2 X2i (−X1i )
∂ βb1
X
= −2 Yi − βb0 − βb1 X1i − βb2 X2i (X1i ) (6)
∂ ubi 2
P X
=2 Yi − β0 − β1 X1i − β2 X2i (−X2i )
b b b
∂ βb2
X
= −2 Yi − βb0 − βb1 X1i − βb2 X2i (X2i ) (7)
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 105 / 136
Derivation of the expression for βb0 , βb1 and βb2
Setting the partial derivatives in equations (5) and (6) equal to zero above
yield the following FOCs (also called normal equations)
X
−2 Yi − βb0 − βb1 X1i − βb2 X2i = 0
X X X
⇒ Yi = nβb0 + βb1 X1i + βb2 X2i (8)
X
−2 Yi − βb0 − βb1 X1i − βb2 X2i (X1i ) = 0
X X X X
⇒ Yi X1i = βb0 X1i + βb1 X1i 2 + βb2 X1i X2i (9)
X
−2 Yi − βb0 − βb1 X1i − βb2 X2i (X2i ) = 0
X X X X
⇒ Yi X2i = βb0 X2i + βb1 X1i X2i + βb2 X2i2 (10)
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 106 / 136
Derivation of the expression for βb0 , βb1 and βb2
Expressing equations (9) and (10) in deviation form, we get:
X X X
yi x1i = βb1 x1i2 + βb2 x1i x2i (11)
X X X
yi x2i = βb1 x1i x2i + βb2 x2i2 (12)
P 2 P
Multiplying equations (11) by x2i and (12) by x1i x2i and subtracting
the resultant equations, we obtain:
X X X X X X
yi x1i x2i2 = βb1 x1i2 x2i2 + βb2 x1i x2i x2i2 (13)
X X X 2 X X
− yi x2i x1i x2i = βb1 x1i x2i + βb2 x1i x2i x2i2 (14)
X X X X X X X 2
yi x1i x2i2 − yi x2i x1i x2i = βb1 x1i2 x2i2 − x1i x2i
(15)
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 107 / 136
Derivation of the expression for βb0 , βb1 and βb2
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 108 / 136
Derivation of the expression for βb0 , βb1 and βb2
Substituting the value of βb1 and βb2 from (16) and (17) respectively into
(8) X X X
Yi = nβb0 + βb1 X1i + βb2 X2i
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 109 / 136
Frisch-Waugh-Lovell (FWL) Theorem
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 110 / 136
Frisch-Waugh-Lovell (FWL) Theorem
Proof
Run a regression of Y on X2 to have
Yi = α
b0 + α
b1 X2i + vbi (1a)
or in deviation form
yi = α
b1 x2i + vbi (1b)
where
P
yi x2i
α
b1 = P 2 (2)
x2i
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 111 / 136
Frisch-Waugh-Lovell (FWL) Theorem
where
P
x1i x2i
δ1 = P 2
b (4)
x2i
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 112 / 136
Frisch-Waugh-Lovell (FWL) Theorem
vbi = λ
b1 wbi + zbi (5)
where
P
wbi vbi
λ1 = P 2
b (6)
wbi
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 113 / 136
Frisch-Waugh-Lovell (FWL) Theorem
Making substitutions vbi and wbi from equations (1b) and (3b) respectively
into equation (6), we obtain
P
wbi vbi
λ1 = P 2
b
wbi
P
x1i − δb1 x2i (yi − α b1 x2i )
= P 2
x1i − δb1 x2i
b1 δb1 x2i2
P P P P
yi x1i − α b1 x1i x2i − δb1 yi x2i + α
= P 2 b2 P 2 P (7)
x1i + δ1 x2i − 2δb1 x1i x2i
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 114 / 136
Frisch-Waugh-Lovell (FWL) Theorem
Making substitutions αb1 and δb1 from equations (2) and (4) respectively
into equation (7), we obtain
y
P
i x1i − α 1
P
x 1i x2i − b1 P yi x2i + α
δ 1
b1 P x 2
δ
b b 2i
λ
b1 = P 2 b2 P 2 P
x +δ x2i − 2δ1 x1i x2i
b
1iP 1 X P
X yi x2i x1i x2i X
λ1 =
b yi x1i − x1i x2i − yi x2i
x2 x2i2
P P
P P 2i X
yi x2i x x
+ P 2 P 1i 2 2i x2i2
x2i x2i
x1i x2i 2 X 2
P P
X
2 x1i x2i X
x1i + P 2 x2i − 2 P 2 x1i x2i (8)
x2i x2i
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 115 / 136
Frisch-Waugh-Lovell (FWL) Theorem
x2i2 , we
P
Multiplying the numerator and denominator of equation (8) by
get
X X X X X X
λ
b1 = yi x1i x2i2 − yi x2i x1i x2i − x1i x2i yi x2i
X X
+ yi x2i x1i x2i
X X X 2 X 2
x1i2 x2i2 + x1i x2i − 2 x1i x2i
P P 2 P P
yi x1i x2i − yi x2i x1i x2i
λ
b1 =
x2i − ( x1i x2i )2
P 2P 2 P
x1i
= βb1 (9)
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 116 / 136
Variance of βb1
σ2 x2i2 σ2
P
var (βb1 ) = P =
x2i2 − ( x1i x2i )2 x1i2 1 − r12
2
P
x1i2
P P
Proof
βb1 = λ
b1
P
wbi vbi
= P 2
wbi
X wbi
= hi vbi where hi = P 2 (1)
wbi
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 117 / 136
Variance of βb1
X X wbi 1 X
hi = P 2 =P 2 x1i − δb1 x2i
wbi wbi
1 X X
=P 2 x1i − δb1 x2i = 0 (i)
wbi
X X wbi 2 1 1
2
hi = P 2 = P 2 = P 2
wbi wbi x1i − δb1 x2i
P 2
1 x
= 2
= P 2 P 2 2iP (ii)
x2i − ( x1i x2i )2
P
P 2 ( x1i x2i ) x1i
x1i − P 2
x2i
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 118 / 136
Variance of βb1
X X wbi 1 X
hi x1i = P 2 x1i = P 2 x1i − δb1 x2i x1i
wbi wbi
1 X 2 b X
=P 2 x1i − δ1 x1i x2i
wbi
P 2 ( x1i x2i )2
P
x1i − P 2
x
= P 2i 2 = 1 (iii)
P 2 ( x1i x2i )
x1i − P 2
x2i
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 119 / 136
Variance of βb1
X X wbi 1 X
hi x2i = P 2 x 2i = P 2 x1i − δ
b x
1 2i x2i
wbi wbi
1 X X
=P 2 x1i x2i − δb1 x2i2
wbi
X P
1 x1i x2i X 2
=P 2 x1i x2i − P 2 x2i
wbi x2i
=0 (iv)
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 120 / 136
Variance of βb1
from equation (1), we have that:
X
βb1 = hi vbi
X
= hi yi − δb1 x2i
X X
= hi yi − δb1 hi x2i
X
= hi y i (2)
Dividing
P 2 P the numerator and denominator on the RHS of equation (3) by
x1i 2
x2i and simplifying, we get:
σ2
x2 σ2
P
var βb1 = P 1i = (4)
( x1i x2i )2
" #
( x1i x2i )2
P
1− P 2 P 2
P 2
x1i 1 − P 2 P 2
x1i x2i x1i x2i
( x1i x2i )2
P
Noting the that P 2 P 2 is the coefficient of determination in the
x1i x2i
regression of X1 on X2 , we re-express equation (4) as:
σ2
var βb1 = P (5)
x1i2 1 − r12
2
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 122 / 136
Numerical Properties of OLS estimators
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 123 / 136
Statistical Properties of OLS estimators
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 124 / 136
Linearity of βb1
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 125 / 136
Unbiasedness of βb1
E (βb1 ) = β1
X X
βb1 = hi yi = hi Yi
X
= hi (β0 + β1 X1i + β2 X2i + ui )
X X X X
= β0 hi + β1 hi X1i + β2 hi X2i + hi ui
X
= β1 + hi ui
P
βb1 = β1 + hi ui
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 126 / 136
Unbiasedness of OLS estimators
Taking conditional expectations gives
X
E (βb1 |Xi ) = β1 + E (hi ui |Xi )
X wbi ui X 1
= β1 + E P 2 |Xi = β1 + P 2 E (wbi ui |Xi )
wbi wbi
X 1
= β1 + P 2 E x1i − δb1 x2i ui |Xi
wbi
X 1 h i
= β1 + P 2 E (x u |X
1i i i ) − δ
b1 E (x u |X
2i i i )
wbi
= β1
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 127 / 136
GAUSS-MARKOV (GM) THEOREM
Gauss-Markov Theorem
Given the assumptions of classical linear regression model, the least
squares estimators have the minimum variance in a class of all linear
and unbiased estimators
That is, least squares estimators are BLUE (Best among Linear
Unbiased Estimators).
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 128 / 136
GAUSS-MARKOV (GM) THEOREM
Proof
Let β˜1 =
P
ai Yi be another linear estimator where the weight wi is
ai = hi + bi
That is,
X X
β˜1 = ai yi = ai Yi
X
= ai (β0 + β1 X1i + β2 X2i + ui )
X X X X
= β0 ai + β1 ai X1i + β2 ai X2i + ai u i
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 129 / 136
GAUSS-MARKOV (GM) THEOREM
For β̃ to be unbiased [ie E (β̃) = β], the conditions are that:
X
ai = 0 (1)
X
ai X1i = 1 (2)
X
ai X2i = 0 (3)
In this case,
X X X X
β˜1 = β0 ai + β1 ai X1i + β2 ai X2i + ai ui
X
= β1 + ai ui
Taking expectations on both sides and using the assumption of
noncorrelation between the regressors and the errors, we have:
E β˜1 = β1
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 130 / 136
GAUSS-MARKOV (GM) THEOREM
Now
X X X
X
ai = 0 ⇒ (hi + bi ) =
hi + bi = 0
X X
⇒ bi = 0 since hi = 0
and
X X X X
ai X1i = 1 ⇒ (hi + bi )X1i = hi X1i + bi X1i = 1
X X
⇒ bi X1i = 0 since hi X1i = 1
and
X X X X
ai X2i = 0 ⇒ (hi + bi )X2i = hi X2i + bi X2i = 0
X X
⇒ bi X2i = 0 since hi X2i = 0
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 131 / 136
GAUSS-MARKOV (GM) THEOREM
and
X X X X X
ai2 = (hi + bi )2 = hi2 + bi2 + 2 hi bi
X X X wbi
⇒ hi2 + bi2 + 2 P 2 bi
wbi
P
X X wbi bi
⇒ hi2 + bi2 + 2 P 2
wbi
P P !
X X x b
1i i − δ
b1 x b
2i i
⇒ hi2 + bi2 + 2 P 2
wbi
X X
⇒ hi2 + bi2
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 132 / 136
GAUSS-MARKOV (GM) THEOREM
Now, the variance of β˜1 is given by
h i2 h i2
var (β˜1 |Xi ) = E β˜1 − E (β˜1 |Xi )|Xi = E β˜1 − β1 |Xi
hX i2
=E ai ui |Xi
And so
X
var (β˜1 |Xi ) ≥ var (βb1 |Xi ) since σ 2 bi2 ≥ 0
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 133 / 136
Consistency
Exercise
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 134 / 136
Maximum Likelihood estimation
Exercise
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 135 / 136
R-squared vs Adjusted R-squared
Exercise
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: ESTIMATION 22nd July, 2021 136 / 136
REGRESSION ANALYSIS: HYPOTHESIS TESTING
Innocent Makuta
University of Malawi
Department of Economics(DoE)
official email: [email protected]
personal email: [email protected]
30th July,2021
Recall:
The Population regression function (PRF) of interest is:
Further recall:
Step 1 in econometric methodology involves stating hypotheses.
These hypotheses are statements of relationships that (may) exist
between or among variables in the PRF
Technically, hypotheses claim that the parameters βj in the PRF take
on certain values (hypothesized values) or satisfy certain conditions
(restrictions)
One example could be that β1 = 0. That is, variable X1 have no
effect (is not related to) the dependent variable Y
Another example could be that β2 = β3 . That is, the effect of
variable X2 on the dependent variable Y is equal to the effect of
variable X3 on the dependent variable Y
Further recall:
The hypotheses stated above are called Null hypotheses
The null hypothesis is denoted H0
Step 4 involves estimating the numerical values of the βbj on the basis
of the sample regression function
H1 : β1 6= 0
H1 : β 1 < 0
H1 : β 1 > 0
H0 : βj = 0
H1 : βj 6= 0
H0 : β1 = β2 = ... = βk−1 = 0
H1 : Not all βs are equal to zero
H0 : β2 = β3 or H0 : β2 − β3 = 0
H1 : β2 6= β3 H1 : β2 − β3 6= 0
H0 : β 1 + β 2 = 1
H1 : β1 + β2 6= 1
Type I error
This consists of rejecting a true or correct H0
The probability of committing Type I error is called the level of
significance and is denoted by α
Type II error
This consists of accepting a false or incorrect H0
The ability of a test to avoid committing type II error is called power
of a test.
Power = 1 − Pr (Type II error)
Decision
Status of H0
Reject Fail to reject
H0 correct/true Type I error
H0 incorrect/false Type II error
Question
How does one determine whether or not to reject a null hypothesis?
Answer
Confidence Interval (CI) approach
Test of Significance approach
p-value approach
Important
To use any of the approaches, one needs to know the probability
distribution followed by estimator.
Estimators must be standardised
βbj − βj βbj − βj
Z= =v ! ∼ N(0, 1)
se(βbj ) u 2
u σ 1
tP
xj 1 − Rj2
2
βbj − βj βbj − βj
t= =v ! ∼ tn−k
se(βbj ) u 2
u σ 1
t Pb
xj 1 − Rj2
2
Pr (βbj − δ ≤ βj ≤ βbj + δ) = 1 − α
where
α is the level of significance
1 − α is the confidence coefficient
βbj − δ is the lower confidence limit
βbj + δ is the upper confidence limit
Yi = β1 + β2 Xi + ui
H0 : βj = 0
H1 : βj 6= 0
In one tailed test, the entire critical region is on one side of the
distribution
Under a lower (or left) tailed test, say,
H0 : βj = 0
H1 : βj < 0
the critical region is on the lower (or left) tail of the distribution.
If α = 0.05,then the area on the lower (or left) tail is 5% of the entire
area under the PDF.
The (1 − α)100% confidence interval is given by
[βbj − tα se(βbj ), ∞)
H0 : βj = 0
H1 : βj > 0
the critical region is on the upper (or right) tail of the distribution.
If α = 0.05,then the area on the upper (or right) tail is 5% of the
entire area under the PDF
The (1 − α)100% confidence interval is given by
p-value < α
Procedure
1 Estimate the regression using OLS
(βbj − βj )
tcomputed =
se(βbj )
SS
Source SS df MSS =
P 2 df
ybi
ybi2
P
ESS k −1
k −1
P b2 ubi2
RSS ui n−k
nP− k
yi2
yi2
P
TSS n−1
n−1
where
SS is sum of squares
df is degrees of freedom
MSS is Mean of sum of squares
Note that with the normality of the error term, the F ratio follows an
F distribution
Now, remember that the expected value of the denominator is
2
ubi
E σ2) = σ2
= E (b
n−k
β1 = β2 = ... = βk−1 = 0
then,
ybi2
P
E = σ2
k −1
the test of overall significance tests the null hypothesis that all the slope
parameters are equal to zero simultaneously
H0 : β1 = β2 = ... = βk−1 = 0
ESS/df
F =
RSS/df
H0 : β1 = β2 = ... = βk−1 = 0
H0 : R 2 = 0
Innocent Makuta (UNIMA) REGRESSION ANALYSIS: HYPOTHESIS TESTING 30th July,2021 38 / 50
Test of Linear Restrictions
H0 : β 1 + β 2 = 1
Or, one may want to test the restriction that X1 and X2 have no
effects on Y
H0 : β 1 = β 2 = 0
To test any restriction, you begin with the original model. This model
is called the Unrestricted model
Next, you incorporate the restriction on the unrestricted model to
form the restricted model
H0 : β 1 + β 2 = 1
H0 : β 1 = 1 − β 2
Suppose you may want to test the restriction that X1 and X2 have no
effects on Y
H0 : β 1 = β 2 = 0
Incorporating this restriction onto the unrestricted model, we obtain
the restricted model as follows
Over time ( indeed over space), there may a structural change in the
relationship between the regressand and the regressor(s)
Structural change means that the value of the parameters of the
model do not remain the same (i.e the parameter have not been
stable) over time (or spatially)
To test for a structural change, we use the Chow Test
One can partition our sample into two periods, one before the
structural change and the other after the structural change.
Let the model for the period before the structural change be
Let the model for the period after the structural change be
the first model assumes no structural change while the latter two
model assume structural change
Assumptions
The errors ui , vi and wi are normally distributed
the two sub-samples are distributed independently. Technically, the
errors for the sub-samples vi and wi are distributed independently
(with df = n1 + n2 − 2k)
Compute the test statistic
Decision:
Reject H0 if |Fcomputed | > Fcritical ⇒ There has been a structural
break
Do not reject H0 if |Fcomputed | ≤ Fcritical ⇒ No structural break