0
$\begingroup$

I estimated a random effects panel model and performed the Breusch-Pagan (BP) test for heteroskedasticity. The test is significant, meaning that there is heteroskedasticity. However, the residual plot seems not to have a clear fanning-in our fanning-out pattern.

Also, even after removing outliers with very low or high residuals, the BP test remains significant. How should I interpret the significance of the test that is in contrast with the residual plot?

Residual plot before removing outliers (sig BP test):

enter image description here

Residual plot after removing outliers (also sig BP test):

enter image description here

The model I use is the following:

plm(ln(gini_eurostat) ~ 
    ln(intraEU_trade_bymemberstate_pct) + 
    FDI_in_pctGDP + FDI_out_pctGDP +
    unempl_pct + 
    lnpop + 
    marketcap_pctGDP + 
    naturalresources_pctGDP + 
    ln(socialbenefits) + 
    ln(tech_exports_pctexports) +
    ln(GDP_percap_constantLCU) + 
    ln(intraEU_trade_bymemberstate_pct) * 
    lowGDP_percap_currentUSD,
    data=pdf, model="random")
$\endgroup$
2
  • $\begingroup$ What is your data and your model? $\endgroup$
    – Tim
    Commented May 5, 2022 at 11:56
  • $\begingroup$ You cross-posted your question on Stack Overflow and then it got migrated to Cross Validated. Please delete one of the copies. $\endgroup$
    – dipetkov
    Commented May 5, 2022 at 21:52

1 Answer 1

1
$\begingroup$

First, focus onthe first plot, without outlier removal: To me it is clear that the spread of the points around the horizontal zero line is increasing with increasing fitted values! If you calculate variance of residuals by intervals --- or better, plot a windowed smooth of the variance above your plot --- that would be clear.

That you do not see this so clearly might be because the spread of points horizontally is somewhat clumped, with interacts with the view of the vertical spread. You could investigate this with further plots, to see if the variance heterogeneity is associated with some specific predictor.

Edit I digitised the values from the first plot in the post (without outlier removal), using the R (CRAN) package metaDigitise. Below is the reconstructed plot, wit added smooths (using R function lowess(locally weighted scatterplot smoother), of the residuals, and of the residuals squared, the last giving a local smooth estimator of variance. In the plot its square root:

Residuals with smooths, local variance

The non-constancy is rather clear. Below the used R code:

library(metaDigitise)
rawdata <- metaDigitise(dir="./Digitise/",
                        summary=FALSE) 
    # and a lot of clicking ...
plotdata <- with(rawdata[[1]][[1]], 
    data.frame(Residuals=y, Fitted_values=x))
smoothvar <- with(plotdata, lowess(Fitted_values, 
     Residuals^2, iter=0))

smoothvar.1 <- within(smoothvar,  y <-sqrt(y))
smoothvar.2 <- within(smoothvar,  y <- -sqrt(y))

with(plotdata, plot(Fitted_values, Residuals,
    main=paste("Residuals with smooth,  locally", 
    "smoothed standard dev (blue)", sep="\n")))
with(plotdata, lines(lowess(Fitted_values, 
     Residuals), col="red"))
lines(smoothvar.1, col="blue")
lines(smoothvar.2, col="blue")

$\endgroup$
2
  • $\begingroup$ Could you elaborate on what you mean by a 'windowed smooth of the variance'? Or give an example? $\endgroup$ Commented May 8, 2022 at 19:29
  • $\begingroup$ Added plot with smoothed sqrt(variance)! $\endgroup$ Commented May 11, 2022 at 14:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.