Testing For Heteroscedasticity Flashcards
3 tests to DETECT heteroscedasticity (WLS to solve, these 3 to identify!)
White
Breush pagan (BP)
Goldfeld-Quant (GQ)
White’s test : so if heteroscedastic (error variance varies) , what determines the variation?
Error variance is a function of ALL explanatory variables. Since when these variables change, variance of error changes too.
𝑣𝑎𝑟(𝜀i|𝑋) = 𝜎² = 𝜎²𝑓(𝑋₁,…,𝑋k )
Shown here
σ² is unobservable since varies, so what do we use as a proxy
Squared residuals.
εhati²
Steps to White’s test (mainly, what is the hypothesis test and test statistic?)
Estimate normal model by OLS to find residuals εhat.
Square the residuals (the proxy to error variance)
(Look at formula)
Hypothesis test
H₀: y₁=y₂=…=y₅=0 (homosced)
H₁: at least one doesnt = 0. (Hetero)
F test since test of overall significance! Slightly diff
R²/m-1
/
1-R²/n-m
~m-1, n-m
Where m is number of parameters (y)
Breusch pagan test
What does regression look like
Hypothesis
And test statistic
Use OLS to obtain residuals, which we square (same as White’s). Also obtain fitted values of Y, denoted Yhat, which we also square.
Test regression looks like
εI²=y₀+y₁Yhati² + ui
Yhati² contains variables X₁,X₂,X₁²,X₂² and X₁X₂ from White’s test. (Basically a shortened version of White’s
Hypothesis
H₀: y₁=0 (homo)
H₁: y₁ ≠0 (hetero)
T test
y₁/se(yhat₁)
~ t(n-2)
Goldfeld-Quandt difference between the other 2
Looks at how error variance changes with the value of a particular regressor. (The prev 2 tests doesnt show which variables are causing the problem)
Consider estimating the model
𝑌 = 𝛽₀+𝛽1𝑋1𝑖 + 𝛽2𝑋2𝑖 + 𝜀𝑖 where the econometrician has some suspicion that the error variance is changing and that it depends upon the values of 𝑋2𝑖.
How to run
Re-order data into ascending order of the scrutinised variable. E.g if X2 is income, arrange by lowest income to highest.
Then split into 2 samples, na (low values) and nb (high values)
na+nb<n since we leave some middle observations out.
Then 2 separate regressions are estimated by OLS
(Page 16)
Then we will have different variance estimators for the different sample a and b
σ²a= RSSa/na -(k+1) (for low group)
σ²b= RSSb/nb - (k+1) (for high group)
Hypothesis testing
𝐻₀:𝜎²α = 𝜎²b
Then we use F stat
F stat formula for the Goldfeld (2)
and degrees of freedom
Fgq =
higher variance of sample/ lower variance of sample
Or RSShigher/RSSsmaller
Degrees of freedom
~nb-(k+1), na - (k+1)
na and nb are sample sizes of a and b
So once we have identified heteroscedasticity using White/BP/GQ test,
How do we deal with heteroscedastic errors (2)
Turn into log form can sometimes turn heteroscedastic error into homoscedastic
If not, WLS.
WLS - how is error variance with heteroscedasticty expressed.
Assume we want to estimate a bivariate model
Yi=β₀+β₁X₁+εi
Heteroscedascity expressed as
Var (εi|X) = σ²i =σ²Zi to the δ
δ is just a number.
Z represents the variable that influences the error variance. (We must’ve used a GQ test to identify that specific variable causing it!)
How to remove heteroscedascity from error term from this equation
Divide our bivariate model by square root of Z to the power ofδ variable. (The variable influencing error variance!)
Yi/rootZδi =β₀/rootZδi + β₁/rootZδi + vi
vi = εi/√xi to the δ
Which is the important part !
Vi is homoscedastic. How?
Look at proof
Main problem in practice
Hard to identify the variable creating the heteroscedasticity in the first place. (GQ works when it is known!)
(I.e actually suspecting Z)
How do we overcome this?
Robust standard errors.
Robust standard errors
Accounts for heteroscedasticiy and autocorrelation in their standard errors