Basic Econometrics - II
Basic Econometrics - II
N Senthil Kumar
Member of Faculty, RBSC, Chennai
Part 2
Classical Regression Analysis -Model Assumptions
Consequence of Violations of Assumptions
Classical Regression Analysis -Model
Assumptions
I. The theoretical Regression model must be Linear in parameters.
A. 𝑌 = α 𝑋 β 𝑒 ϵ
B. 𝑌 = α + β 𝑋 2 + ϵ
β
C. 𝑌 = α + 𝑋 + ϵ
D. Log 𝑌 = α + β𝑋 + ϵ
E. 𝑌 = α + β 𝑙𝑜𝑔𝑋 + ϵ
Classical Regression Analysis -Model
Assumptions
II. The independent variables or fixed/ deterministic or
they are independent of error terms.
III. Mean of the error term is zero, 𝐸 ϵ𝑖 = 0 𝑉 i
• If the dependent variables are deterministic then β will be
unbiased under assumption III.
• If the dependent variables are random, then we need the
dependent variable and errors should be independent.
𝜎ො 2 = 𝜖ෝ𝑖 2Τ 𝑛 − 2
• If the standard errors are smaller, our
estimates are more likely to be closer to the
real parameter.
• Interval estimation provides a confidence
interval. For level of 5%, the probability of such
estimated intervals containing the true
parameter is 95% 2
• Error variance is 𝜎 unknown, which we
replace with estimated values
• This lead to use of t distribution for arriving at
the confidence intervals:
𝑃 ቀ𝛽መ𝑂𝐿𝑆 − 𝑡𝛼Τ2 𝑠𝑒 𝛽መ𝑂𝐿𝑆
≤ 𝛽 ≤ 𝛽መ𝑂𝐿𝑆 −𝑡𝛼Τ2 𝑠𝑒 𝛽መ𝑂𝐿𝑆 ቁ = 1 − 𝛼
Hypothesis Testing on Regression Estimators
• Can we make a statement about the relationship
between the dependent and independent
variable?
• Statistical Hypothesis Testing tells whether the
observed data is compatible with the statement.
• Is there a relationship between the dependent
and independent variable? Is reduced to testing
Ho : β=0 Vs H1 : β ≠ 0.
• The test is statistically significant if the value of
the t-statistic (under the null hypothesis t-
statistic = 𝛽መ𝑂𝐿𝑆 / 𝜎ො 2Τσ 𝑋𝑖 − 𝑋ത 2 ) falls in the
critical region at a given level of significance.
• In our case, very high or low values of t-statistic
will be evidence against the null hypothesis.
• P-Value also can be used, which is the
probability of getting t value equal and more
than the calculated value. Hence, very small p
value, we reject the null.
Interpretation of Results
of Regression Analysis
1. Standard errors of the estimators
provides a good measure of reliability
of the estimators.
2. Check whether the sign of dependent
variables are in consistent with the
prior theory.
3. If P value is lower, the test is
significant and reject the null.
4. Estimate and arrive at estimated
errors (proxies to actual errors) and
see whether they follow normal
distributions.
5. Use adjusted R2 as a measure of
goodness of fit for the model
Consequence of violation of normality
assumption
1. Normality violation does not affect the BLUE properties of the OLS
estimators since BLUE properties depends only on the mean, variance,
covariance structure of the errors and not on the distribution of errors.
2. Normality assumption helps in deriving the distributions of the
estimators and hence in hypothesis testing.
3. Without normality assumption, for large samples, we can assume normal
distribution for the estimators.
2 4
𝑆2 (𝐾−3)2 𝐸(𝑋−𝜇)3 𝐸(𝑋−𝜇)
4. Normality test: 𝐽𝐵 = 𝑛 + , 𝑆2 = , K=
6 24 𝐸(𝑋−𝜇)2 3 𝐸(𝑋−𝜇)2 2
5. 𝐽𝐵 ~ 𝜒22 under the null hypothesis of normally distributed errors
Simple Linear Regression Analysis Call:
lm(formula = circumference ~ age, data = Orange)
Practical – 2 (Standard Errors of
the Estimators) Residuals:
Min 1Q Median 3Q Max
𝑣𝑎𝑟 𝛽𝑂𝐿𝑆 = 𝜎 2൘ 𝑋𝑖 − 𝑋ത 2 -46.310 -14.946 -0.076 19.697 45.111
Coefficients:
Standard error of the estimators: Estimate Std. Error t value Pr(>|t|)
(Intercept) 17.399650 8.622660 2.018 0.0518 .
𝑠𝑒 𝛽𝑂𝐿𝑆 = 𝜎ො ൘ 𝑋𝑖 − 𝑋ത 2
age 0.106770 0.008277 12.900 1.93e-14 ***
---
Standard error of Residuals Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Goldfeld-Quandt test
data: m3
GQ = 1.3588, df1 = 16, df2 = 15,
p-value = 0.2789
alternative hypothesis: variance
increases from segment 1 to 2
𝑖=1
• Hence the formula for estimating the stand error 𝑠𝑒(𝛽መ𝑂𝐿𝑆 ) has become
incorrect. Also, 𝜎ො 2 is also estimated with incorrect formula and hence
inference on the parameter is not possible.
• Further 𝛽መ𝑂𝐿𝑆 is not efficient.
Approach for Auto Correlation - Inference
• For inference, Newy and West (1987), extended Whites idea by replacing
the heteroskedastic variance with OLS 𝑢ො 𝑖2 and correlations with 𝑢ො 𝑡 𝑢ො 𝑡−𝑠 for
desirable levels of lags.
• Note that the asymptotic depends on large T relative to the number of lags.
• Hence, we can use the Heteroskedasticity-Auto-correlation robust
standard errors as estimated by 𝑣𝑎𝑟 𝛽መ𝑂𝐿𝑆 = 𝑋 ′𝑋 −1(𝑋 ′Σ𝑋) 𝑋 ′𝑋 −1 for
inference.
Estimation Approach for Auto Correlation (Homoskedasticity is assumed)
• In the presence of auto correlation, 𝛽መ𝑂𝐿𝑆 is not efficient and hence we
need to model the same.
• Estimating T (T-1) parameters are not possible and hence structural
approach (justified by theory) is used to estimate the correlations so that
the number of parameters to be estimated may be minimal .
• Example: For AR(1) structure 𝑢𝑡 = 𝜌𝑢𝑡−1 + 𝜀𝑡 with 𝜀𝑡 𝑊𝑁 (0, 𝜎𝜀2 ) which
gives 𝑣𝑎𝑟 (𝑢𝑡 ) = 𝜎𝑢2 = 𝜎𝜀2 Τ 1 − 𝜌2 𝑎𝑛𝑑 𝐸 𝑢𝑡 𝑢𝑡−𝑠 = 𝜌𝑡−𝑠 𝜎𝑢2
𝜌ො
• For AR(1), we have a transformation (Cochrane-Orcutt (1949)) as below
renders a BLUE estimator. Here 𝜌 is in AR(1) specification as 𝑢𝑡 =
𝜌𝑢𝑡−1 + 𝜀𝑡 .
𝑦𝑡 − 𝜌𝑦𝑡−1 = 𝛼 1 − 𝜌 + 𝛽 𝑋𝑡 − 𝜌𝑋𝑡−1 + 𝜀𝑡
𝑤ℎ𝑒𝑟𝑒 𝑡 = 2 𝑡𝑜 𝑇 𝑎𝑛𝑑 𝜀𝑡 = 𝑢𝑡 − 𝜌𝑢𝑡−1
• We replace 𝜌 with a consistent estimator 𝜌ො which gives asymptotically
መ
efficient estimators 𝛼ො , 𝑎𝑛𝑑 𝛽.
• Cochrane-Orcutt (1949) also provide an iterative search method for 𝜌ො
Test for Auto Correlation
Durbin-Watson Test
𝑇 ෝ𝑡−𝑢
𝑢 ෝ𝑡−1 2
• Durbin-Watson Statistic 𝐷𝑊 = σ𝑡=2 𝑇 2 → 2 (1 − 𝜌). Hence when 𝜌=0,
σ𝑡1 𝑢
ෞ𝑡
DW will be closed to 2 and DW varies from 0 to 4.
• The Durbin-Watson statistic is appropriate when there is a constant in the
regression. Durbin-Watson statistic is inappropriate when there are lagged
values of the dependent variable among the regressors.
Breusch-Godfrey test
• Breusch-Godfrey test is a Lagrange Multiplier test. Here OLS residuals 𝑢ො 𝑡 is
regressed
2 2
on 𝑢ො 𝑡−1 and other regressors in the model. The test statistic is
𝑇𝑅 ~ 𝜒 1 under the null of no auto correlation.
• Breusch-Godfrey test can be specified to include AR(2), MA(2) etc.
• Breusch-Godfrey test is valid even when lagged values of the dependent variable
are present among the regressors.
• “For 𝜌 is large and positive, first differencing the data may not be a bad solution”
Baltagi.
Simple Linear Regression Analysis Practical – 3 (Autocorrelation) Setting up the model
> m.ts <- lm (C ~ Y, data = us_inc_cons)
> summary (m.ts)
Call:
lm(formula = C ~ Y, data = us_inc_cons)
Residuals:
Min 1Q Median 3Q Max
-929.79 -317.75 17.04 339.56 799.53
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -1.343e+03 2.196e+02 -6.118 1.78e-07 ***
Y 9.792e-01 1.139e-02 85.961 < 2e-16 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 437.6 on 47 degrees of freedom
Multiple R-squared: 0.9937, Adjusted R-squared: 0.9935
F-statistic: 7389 on 1 and 47 DF, p-value: < 2.2e-16
Simple Linear Regression Analysis Practical – 3 (Autocorrelation) Testing for Auto Correlation
par (mfrow=c(2,2))
acf (m.ts$residuals)
pacf (m.ts$residuals)
m1.ts <- lm (m.ts$residuals ~ lag
(m.ts$residuals, 1))
acf (m1.ts$residuals)
pacf (m1.ts$residuals)
par (mfrow=c(1,1))
dwtest(m.ts)
bgtest (m.ts)
bgtest (m.ts,order = 2)
> dwtest(m.ts)
Durbin-Watson test
data: m.ts
DW = 0.1805, p-value < 2.2e-16
alternative hypothesis: true autocorrelation
is greater than 0
> bgtest (m.ts)
Breusch-Godfrey test for serial
correlation of order up to 1
data: m.ts
LM test = 38.512, df = 1, p-value = 5.443e-
10
Simple Linear Regression Analysis Practical – 3 (Autocorrelation) HA Consistence Inference/Estimation
> V <- NeweyWest(m.ts,lag = 3,prewhite = F)
> coeftest(m.ts,V)
t test of coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -1.3433e+03 4.1359e+02 -3.248 0.002148 **
Y 9.7923e-01 2.1971e-02 44.569 < 2.2e-16 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
> m2.ts <- cochrane.orcutt(m.ts)
> summary (m2.ts)
Call:
lm(formula = C ~ Y, data = us_inc_cons)
Estimate Std. Error t value Pr(>|t|)
(Intercept) -1.7237e+03 8.5921e+02 -2.006 0.05074 .
Y 9.9614e-01 3.7925e-02 26.266 < 2e-16 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 183.2567 on 46 degrees of freedom
Multiple R-squared: 0.9375 , Adjusted R-squared: 0.9361
F-statistic: 689.9 on 1 and 46 DF, p-value: < 2.445e-29
Durbin-Watson statistic
(original): 0.18050 , p-value: 4.192e-22
(transformed): 2.44775 , p-value: 9.27e-01
Simple Linear Regression Analysis Practical – 3 (Autocorrelation) Residual Analysis