11slides.pdf - Heteroskedasticity-Robust Inference Tyler...

This preview shows page 1. Sign up to view the full content.

You've reached the end of this preview.

Unformatted text preview: Heteroskedasticity-Robust Inference Tyler Ransom Univ of Oklahoma Feb 19, 2019 1 / 24 Today’s plan 1. Review reading topics 1.1 The Lagrange Multiplier test 1.2 Consequences of Heteroskedasticity 1.3 Heteroskedasticity-Robust Inference after OLS Estimation 1.4 Testing for Heteroskedasticity 2. In-class activity: Practice testing and correcting for heteroskedasticity 2 / 24 The Lagrange Multiplier (LM) test 3 / 24 The LM test 1. Aside from the F test, you may come across the LM test 2. Slightly different way to test joint hypotheses 3. The LM test statistic has a χ2 distribution with df = q 4. Otherwise, it’s pretty much the same as F test 5. LM test a.k.a. “n R-squared test”’ 6. See today’s in-class lab for further details 4 / 24 Consequences of heteroskedasticity for OLS 5 / 24 Review: Gauss-Markov Assumptions 1. y = β 0 + β 1 x1 + β 2 x2 + ... + β k xk + u 2. random sampling from the population 3. no perfect collinearity in the sample 4. E(u|x) = E(u) = 0 (exogenous explanatory variables) 5. Var (u|x) = Var (u) = σ2 (homoskedasticity) 6 / 24 Properties of OLS - Under these five assumptions, OLS has lots of nice properties - OLS is BLUE and asymptotically efficient - If we add normality (CLM), the tests are exact for any sample size - Without normality, usual OLS test are asymptotically justified - But what if we act as if we know nothing about Var (u|x)? 7 / 24 What happens when Var (u|x) 6= Var (u)? - OLS is still unbiased and consistent under A(1)-(4) - But it’s no longer BLUE - Usual standard errors are no longer valid - t stats, F stats, and CIs cannot be trusted - Need to adjust the SEs to make them valid - Continue to use OLS; but do heteroskedasticity-robust inference 8 / 24 Heteroskedasticity-robust inference 9 / 24 Correcting SEs for Heteroskedasticity - SEs, test statistics can be modified to be valid - Can conduct hypoth. tests without worrying A(5)’s validity - Most regression packages include an option to compute heteroskedasticity-robust standard errors - These then produce heteroskedasticity-robust t statistics - and heteroskedasticity-robust confidence intervals 10 / 24 How to do this in R - Easiest way to do this in R is with lmtest package library(lmtest) tidy(coeftest(est, vcov=hccm)) - Result will be slightly different than typical tidy(est) output - Typically (but not always), robust SEs larger than regular SEs - Resulting t tests are valid - “hccm” stands for “Heteroskedasticity Corrected Covariance Matrix” 11 / 24 How to do robust F test in R - To do a robust F test, use the car package library(car) library(lmtest) tidy(linearHypothesis(est, c(’x1=0’,’x2=0’), vcov=hccm)) # or, in piped form: est %>% linearHypothesis(c(’x1=0’,’x2=0’, vcov=hccm)) %>% tidy 12 / 24 Why bother with default SEs at all? 1. Tradition (not necessarily a good answer) 2. Robust stats and CIs only have asymptotic justification ... ... even if the full set of CLM assumptions hold - Typically, researchers report the robust standard errors - Especially with large sample size 13 / 24 Example results - Using college data from wooldridge package: \ = lwage 1.6492 − .2202 female + .0521 exper + .0762 coll (.0318) (.0066) (.0058) (.0720) [ .0325 [.0060] [.0068] [.0754] 2 n = 750, R2 = .302, R = .299 14 / 24 Testing for Heteroskedasticity 15 / 24 Some history - Before the discovery of heteroskedasticity-robust inference: - Workflow was to first test for it and then, - if it was found, abandon OLS for weighted least squares - Nowadays, there is less of a case for even testing for heteroskedasticity. 16 / 24 Why test for it? We may want to: 1. know if we need to report robust standard errors 2. know if we can improve over OLS (possible if there’s heterosk.) 3. determine if variance in y about its mean changes with the values of the x’s 17 / 24 Testing for heteroskedasticity - In order to test for heteroskedasticity, we maintain y = β 0 + β 1 x1 + β 2 x2 + ... + β k xk + u E(u|x) = 0, which are A(1) and A(4), respectively - also assume random sampling A(2) - and of course rule out perfect collinearity A(3) 18 / 24 Testing for heteroskedasticity (cont’d) - If E(u|x) = 0 then Var (u|x) = E(u2 |x). - Therefore, A(5) can be written E(u2 |x) = σ2 = E(u2 ), 19 / 24 The null hypothesis - A(5) as a testable null hypothesis is then: H0 : E(u2 |x1 , x2 , ..., xk ) = σ2 (constant) - We can formulate this as a regression equation with F test: u2 = δ0 + δ1 x1 + . . . + δk xk + v E(v |x1 , ..., xk ) = 0 and then test whether all slope coefficients are zero: H0 : δ1 = δ2 = ... = δk = 0 20 / 24 More on the null hypothesis - The previous equation is an odd looking regression model - dependent variable is u2 , the squared error - But it satisfies A(1)-A(4) - Under the null H0 : δ1 = δ2 = ... = δk = 0, the intercept must be σ2 : δ0 = σ2 - Under the null, it makes sense to assume that v is independent of the xj - Thus, it satisfies A(1)-A(5), so use original F test 21 / 24 Some complications 1. u2 can’t be normally distributed - In fact u2 ∼ χ2 if u ∼ N - We’ll have to appeal to Central Limit Theorem 2. We don’t actually observe u! - Will need to use residuals uˆ instead 22 / 24 The Breusch-Pagan (BP) test The Breusch-Pagan test is the process described previously. Steps: 1. Estimate your regression by OLS 2. Saving the residuals, uˆ i and compute their squares uˆ 2i 3. Regress uˆ 2i on all x’s 4. Compute the default overall F test 5. If p-value is sufficiently small, reject H0 : homoskedasticity You’ll get to practice this in today’s lab 23 / 24 Performing the BP test in R - The code to do the BP test in R is below: library(lmtest) tidy(bptest(est)) - Note: An alternative to the BP test is the White test - You’ll practice using both in the lab today 24 / 24 ...
View Full Document

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern