Testing for heteroscedasticity (after OLS regression) using two different tools in R I obtain two contractictory results:
1/ Global Validation of Linear Models Assumptions of the gvlma
package :
gvlma::gvlma(BMall_lm)
returns:
Call:
lm(formula = BM ~ TAM_jun + NBD3 + snow_acc, data = d)
Coefficients:
(Intercept) TAM_jun NBD3 snow_acc
-618.545 -289.143 -11.785 1.186
ASSESSMENT OF THE LINEAR MODEL ASSUMPTIONS
USING THE GLOBAL TEST ON 4 DEGREES-OF-FREEDOM:
Level of Significance = 0.05
Call:
gvlma::gvlma(x = BMall_lm)
Value p-value Decision
Global Stat 24.7590 5.625e-05 Assumptions NOT satisfied!
Skewness 1.5379 2.149e-01 Assumptions acceptable.
Kurtosis 0.6797 4.097e-01 Assumptions acceptable.
Link Function 22.2932 2.340e-06 Assumptions NOT satisfied!
Heteroscedasticity 0.2482 6.183e-01 Assumptions acceptable.
The conclusion here is that the homoscedasticity assumption is verified
2/ BUT when I use the Breusch-Pagan test in the lmtest
package I get the reverse :
lmtest::bptest(BMall_lm)
studentized Breusch-Pagan test
data: BMall_lm
BP = 25.137, df = 3, p-value = 1.446e-05
Here, the homoscedasticity assumption is not verified
Any help about which one to follow ?