Professional Documents
Culture Documents
File 1
File 1
Section 1, 2 & 3
Lecture # 5
July 9-11, 2012
In this lecture, we will discuss:
a. Breusch-Pagan Test
b. Harvey Test
c. Glejser Test
d. PARK Test
e. White Test
a. Consistent OLS
b. Weighted LS
Please recall the assumptions of Classical Linear Regression Model; one of them is given below:
Homoskedasticity: The term Homoskedasticity means same spread from the regression line. Variance of
error term must be constant. If spread from the regression line deviate then Heteroscedasticity will exist
in the data.
Page 2 of 15
Effects of Heteroscedasticity:
If Standard Error increase then t-statistics decrease (due to the denominator effect).
Ultimately due to t-statistics, hypothesis testing will be incorrect. So such variable that was
significant in nature will become insignificant.
If Standard Error decrease then t-statistics increase (due to the denominator effect).
Ultimately due to t-statistics, hypothesis testing will be incorrect. So such variable that was
insignificant in nature will become significant.
iv) F-Statistics: Due to Heteroscedasticity regression line (OLS, CLRM or linear line are same
name) not remain best fit. So decision making will be inefficient.
In simple words, F-Statistics is joint hypothesis of X1 and X2 (these are our independent
variables), that means whether X1 and X2 jointly can influence Y that is dependent variable
or not. Following are results:
ii. Regress these variables, go to quick menu, estimate equation and write equation; x1 as
dependent variable and x2 x3 and x4 as independent variables. x1 c x2 x3 x4 click OK.
Following results will be displayed.
iii. In Breusch Pagan Test, we use square root of error term because generation or error term is
assumption of Breusch Pagan Test; by doing square root all negative values will become
positive. So we will first generate error term then we will take square root or error term.
Equation is: genr ut=resid (press enter) then genr utsq=ut^2, (press enter) as shown in
picture.
iv. Again go to quick menu and estimate equation. Now utsq will become dependent variable.
Equation will be: utsq c x2 x3 x4. From the results we will pick the value of R-square which is
0.041560 in this case (as shown in picture below). We use R-square value for computing
calculated value by formula: LM = n*R2
= 39*0.041560
= 1.62084 -----------------------------This value is called Calculated Value.
Page 4 of 15
v. For final decision about Heteroscedasticity (whether the problem of Heteroscedasticity exist
or not), we need critical value or tabulated value. We will generate chi-square as: genr
chi=@qchisq(0.95,3). Here 0.95 is confidence interval and 3 means that we have 3
independent variables namely x2 x3 and x4. After generating chi square “chi” file name will
appear. Please open, series of single constant value will appear. This value is called
tabulated or critical value.
Decision Criteria:
o If Calculated value > Tabulated/critical value then Heteroscedasticity (In other words, there is
significant relationship)
o If Calculated value < Tabulated/critical value then Homoskedasticity (In other words, there is
insignificant relationship).
On the basis of above decision criteria, we conclude that there is Homoskedasticity or insignificant
relationship.
Page 5 of 15
i. Generate variables
ii. Go to quick and estimate equation with x1 c x2 x3 x4
iii. Go to view of that small window and click on residual diagnostics then Heteroscedasticity
Tests; as shown in given below:
iv. Select Breusch-Pagan Test and click OK, results will display as given below picture. There are
same results as previous method. As shown in picture below, we will check Prob. Chi-Square
(3), if this probability is insignificant then it means there is Homoskedasticity, if significant
there will exist Heteroscedasticity. In this case Chi-Square (3) is 0.6547 that is insignificant or
existence of Homoskedasticity.
Page 6 of 15
Glejser Test:
i. Generate Variables
ii. Regress those: x1 as dependent and x2, x3 and x4 as independent variable
iii. Genr ut=resid (as you previously generated in Bruesch Pagan Test)
iv. But for Glejser Test, don’t create error term square
v. Create: genr absut=abs(ut)
(Glejser says that don’t use square root but absolute value of error term should be used, so
using absolute value is the assumption of Glejser Test).
vi. Now Regress as: absut c x2 x3 x4
vii. Pick the value of R-Square
viii. Apply the formula: LM = n*R2 -------------Called Calculated Value
ix. Generate chi-square as: genr chi=@qchisq(0.95,3)-------------Called Tabulated or critical value
x. Compare and take decision (Decision Criteria is same as given in page 4)
Harvey Test:
i. Generate Variables
ii. Regress those: x1 as dependent and x2, x3 and x4 as independent variable
Page 7 of 15
iii. Genr ut=resid (as you previously generated in Bruesch Pagan Test)
iv. But for Harvey Test: generate error term square as genr utsq=ut^2
v. Then genr Lutsq=log(utsq)
(Harvey says that don’t use square root or absolute value of error term but log of error term
square should be used, so using log of error term square is the assumption of Harvey Test).
vi. Now Regress as: Lutsq c x2 x3 x4
vii. Pick the value of R-Square
viii. Apply the formula: LM = n*R2 -------------Called Calculated Value
ix. Generate chi-square as: genr chi=@qchisq(0.95,3)-------------Called Tabulated or critical value
x. Compare and take decision (Decision Criteria is same as given in page 4)
i. Generate Variables
ii. Regress those: Y as dependent and x1, x2 and x3 as independent variable
iii. Genr ut=resid (as you previously generated in Bruesch Pagan Test)
iv. Generate error term square as genr utsq=ut^2
(In this test we use linear and non linear; means we use both product and square form)
Suppose if our Regression Equation include:
X1 + X2+X3 --------------------linear form
X12 + X22+X32 ------------------in square form (non linear)
So, we will generate:
genr x1sq=x1^2
genr x2sq=x2^2
genr x3sq=x3^2
genr x1x2=x1*x2
genr x1x3=x1*x3
genr x2x3=x2*x3
In non-linear form there is square on x1 x2 and x3 that’s why we created square of x1, x2 and x3
(as x1sq x2sq x3sq)
Park Test:
i. Generate Variables
ii. Regress those: Y as dependent and x1, x2 and x3 as independent variables
iii. Genr ut=resid (as you previously generated in Bruesch Pagan Test)
iv. Generate error term square as genr utsq=ut^2
v. Genr Lutsq=log(utsq)
vi. Now regress as: Lutsq c log(x1) log(x2) log(x3)
vii. Error Message: as shown in picture below “Log of non positive number” this means that in
error term there are zero or negative numbers. Log of zero or negative is not possible.
i. Regress simple
ii. Go to view----residual diagnostics and choose Heteroscedasticity Test
iii. Choose one by one all tests
Page 9 of 15
Decision Criteria:
If Chi-square probability is higher than 5% or 0.05 then there will be Homoskedasticity otherwise
Heteroscedasticity. This is the easiest way for detection.
i. Consistent LS
ii. Weighted LS
Pre Heteroscedasticity:
In order to compare pre and post Heteroscedasticity, simply regress as: dpo c g lev p s t; small window
will open containing basic information. Copy (Press Ctrl +A) and paste in excel.
Post Heteroscedasticity:
Now, compare pre and post Heteroscedasticity results with respect to:
a. β (Regression Coefficient)
b. Standard Error
c. T-Statistics
d. F-Statistics
Process is same:
After adopting these two methods for the removal of Heteroscedasticity, check your results. Go to view
after simply regression: dpo c g lev p s t or x1 c x2 x3 x4 and then go to view-----residual diagnostics----
Heteroscedasticity and choose any one. If Prob. Chi-Square (5) is insignificant then it means, our data is
free from Heteroscedasticity. If P value is significant (less then.05) then Heteroscedasticity exits. If
Heteroscedasticity exist after the removal process then repeat same process and change the variable in
(write the name of variable in weight series) which Heteroscedasticity exits.
For testing general misspecification, there is one test “Ramsey RESET Test”. Steps are:
i. Simple regress
ii. Go to view---stability diagnostics then click Ramsey RESET Test
iii. Number of fitted terms by default is “1”
iv. Use 1---for square ; 2 for quadratic
v. As shown in picture below, we use 1
Page 14 of 15
Value df Probability
t-statistic 0.113634 34 0.9102
F-statistic 0.012913 (1, 34) 0.9102
Likelihood ratio 0.014809 1 0.9031
F-test summary:
Mean
Sum of Sq. df Squares
Test SSR 0.219004 1 0.219004
Restricted SSR 576.8755 35 16.48216
Unrestricted SSR 576.6565 34 16.96049
Unrestricted SSR 576.6565 34 16.96049
LR test summary:
Value df
Restricted LogL -107.8729 35
Unrestricted LogL -107.8655 34
Page 15 of 15
Decision Criteria:
“Knowledge is power. Information is power. The secreting or hoarding of knowledge or information may be an act
of tyranny camouflaged as humility.” (Robin Morgan)
Note: Please convey, if you found any mistake. Comments for improvement will be highly appreciated. Thanks
Abdul Qadeer Khan