0

I am using a multistep regression to estimate price elasticity coefficients. To correct for heteroskedasticity, I am using the vcov function, which provides a new variance-covariance matrix. Once I have the new VCOV derived, I can't find a way to use that in a subsequent regression. The goal is to then extract the residuals so I can retest for normality, heteroskedasticity, and spatial autocorrelation.

Apologies for the snippet below - the full model is around 12,000 lines.

Hausman_reg1c <- stepAIC(Hausman_reg1b, direction = "both", trace = FALSE)

C1 <- coeftest(Hausman_reg1c, vcov = vcovHAC(Hausman_reg1c, type="HC1")) 
#simulates STATA robust standard errors
  • Two points. First, many contributors to this site would [question stepwise predictor selection](https://stats.stackexchange.com/q/20836/28500). If you provide more details about your study you might get suggestions for better approaches. Second, the "robust standard errors" are for regression coefficients; unless I'm mistaken those don't directly map back to changes in the residuals per se. Are you perhaps trying iterative estimation of the coefficient covariance matrix based on residuals as in [FGLS](https://en.wikipedia.org/wiki/Generalized_least_squares#Feasible_generalized_least_squares)? – EdM Oct 11 '19 at 17:10
  • Thanks - I'm building a machine learning application that starts with thousands of potential local factors and skinny's it down to a 10-15 factors which I then use stepwise regression to further reduce. I generally agree with you about stepwise regressions from a pure econometrician standpoint. I'm mostly looking for an error correction method which I can then pass into a Breusch-Pagan test. – Michael Westerman Oct 11 '19 at 20:01
  • This area is a bit beyond my expertise, but as I understand it the HC or HAC adjustments to vcov don't provide adjustments to the residuals themselves. They change the way the residuals are mapped into the covariance matrix for estimating significance of regression coefficients and the like. If I'm right that the residuals aren't changed, then Breusch-Pagan tests would be unchanged. I'm open to further tutoring on this if I'm wrong. – EdM Oct 11 '19 at 21:28

1 Answers1

1

What you seek to do:

Once I have the new VCOV derived ... extract the residuals so I can retest for normality, heteroskedasticity, and spatial autocorrelation

does not seem to be possible in the way that you wish. The residuals themselves will be unchanged.

The HC and HAC adjustments to a covariance matrix do not alter the observations or the values of regression coefficient estimates. They alter the variance-covariance matrix among the regression coefficient estimates from that provided by ordinary least squares (OLS) to correct for heteroscedasticity or autocorrelations among error terms. Such corrections can provide better tests of coefficient significance and the like when the assumptions underlying inference in OLS are not met.

As neither the coefficient point estimates nor the observations are altered by HC or HAC adjustments, however, the residuals themselves will not be changed by adoption of these corrections to the covariance matrix. So Breusch-Pagan or other tests on the residuals would return the same values as before.

There is an iterative approach to situations with heteroscedasticity or autocorrelations provided by Feasible Generalized Least Squares, FGLS. This involves a series of weighted least squares that does alter the values of the regression coefficient estimates, but it's not clear to me that the residuals will become so well behaved as to fit the assumptions of OLS as you seem to wish. Should you wish to proceed with such an approach, the link to FGLS shows how to incorporate adjusted covariance matrices, along with a model for the covariance structure, into this iterative process.

Your question does raise the interesting point of how to validate a particular choice of HC or HAC correction to the variance-covariance matrix. That's a separate question on which I claim no expertise.

EdM
  • 57,766
  • 7
  • 66
  • 187