On Sat, 13 Jun 2020, Salvatore Salvo wrote:
Please yr help with this issue
After performing a simple Linear regression (file attached) and asking for
a Breush Pagan Heterocedasticity test in Menu TEST I get the response below
Instead if square residual are saved and used as a Dependent variable
against above regressors the answer is different, please see below
Why does it happen?
In the Breusch-Pagan test (T. S. Breusch and A. R. Pagan,
Econometrica 47/5, 1979), the dependent variable in the auxiliary
regression is the squared residual scaled by the ML estimate of its
variance:
series g = $uhat^2 / ($ess/$T)
Regress this on the relevant regressors and you will reproduce
gretl's test. The LM test statistic is half of the Regression (or
"Explained") sum of squares. After running the auxiliary regression
you can find it as
LM = (sst(g) - $ess) / 2
Here's a complete example:
open data4-10
ols ENROLL 0 CATHOL INCOME
modtest --breusch-pagan
series g = $uhat^2 / ($ess/$T)
ols g 0 CATHOL INCOME --simple-print
LM = (sst(g) - $ess) / 2
Allin Cottrell