On Thu, 14 Nov 2013, Mark wrote:
How is the LM test calculated for Gretl for just a standard model.
The Breusch-Pagan LM test for heteroskedasticity is calculated as per the
authors' 1979 Econometrica article (vol. 47, no. 5). That is, it is one
half of the explained sum of squares from a regression of the squared
residuals from the original OLS model, scaled by the MLE of the error
variance, on the original regressors.
Manual computation of the test statistic would look like this:
<hansl>
ols y const X
series u2 = $uhat^2
scalar sigma2 = $ess/$T
series g = u2/sigma2
ols g const X
scalar RSS = sst(g) - $ess
scalar LM = 0.5 * RSS
</hansl>
Allin Cottrell