By playing a bit with gretl's and R's (plm) Breusch-Pagan test, I found out that plmtest (in R) does not treat unbalanced panels while gretl does - at least, I feel like gretl uses the method of Baltagi/Li (1991) for unbalanced panels. I think, the documentation could reflect this. What do you think?
[Also I have prepared a rather rough implementation for R, see http://stackoverflow.com/questions/31988449/implementation-of-breusch-pagan-test-for-random-effects-in-plm-with-unbalanced-p and the GitHub link mentioned there]
Sorry for not getting an answer so far. Strictly speaking you're right that this could be considered a documentation bug, so I'm leaving this (just lowering priority a little). However, for discussions like this the gretl mailing list are currently still a better place, see http://lists.wfu.edu/mailman/listinfo/gretl-users.
(I don't know the answer to your question, sorry.)
And BTW, does your R implementation match gretl's results for some test cases?
thanks,
sven
Thanks for getting at this issue.
My own implementation of the Breusch-Pagan test for unbalanced panels as in Baltagi/Li (1990) [not (1991) as in my original post] matches gretl's test exactly. Thus, I can safely say that gretl uses that. Please update the documentation.
Full reference is:
Baltagi/Li (1990), A lagrange multiplier test for the error components model with incomplete panels, Econometric Reviews, 9, pp. 103-107
In addition:
There is also a Breusch-Pagan test for heteroskedasticity. Thus, it would be good to distinguish that one from the Breusch-Pagan test for inidvidual effects. The current output in 2015d just calls the test performed "Breusch-Pagan test" (However, advanced users can distinguish based on the null: "Null hypothesis: Variance of the unit-specific error = 0").
Yes a remark should be added, in the section "Testing panel models" in chapter 18. Furthermore I've noticed that the "modtest" command has an option "--breusch-pagan" that indeed is about the heteroskedasticity test which I find a little problematic because of the ambiguity you mention.
But at least the documentation fix is easy.
cheers,
sven
Here's a link to my post on the mailing list about this:
http://lists.wfu.edu/pipermail/gretl-devel/2016-March/006644.html
cheers,
sven
OK the "testing panel models" section is in chapter 19 (as of August 2017), not 18.
Let me pick up this thread by raising a more fundamental question, however: How can one retrieve the test results of the automatically printed tests (Breusch-Pagan idiosyncratic variance etc.) in a script way? The principle in gretl is normally that everything can be done either in the GUI (with some exceptions) or by programming with the Hansl scripting language.
thanks,
sven
For the record, it is answered here (with the comment that it is yet to be documented how to get an overview of the extra accessors): http://lists.wfu.edu/pipermail/gretl-devel/2017-October/008143.html
Use:
eval $model.bp_testOk, let me try to summarize before this gets too confusing:
1) Baltagi/Li for the unbalanced case should still be mentioned, only that the chapter of the guide is a moving target, now it seems to be 20 (Nov. 2017). (But the tex source file of course is not affected by the automatic numbering.)
2) The $model accessor inspection could/should be documented (but noting that the built-in reference for $model already says: "additional information may be available ... you can get a copy of the bundle and print its content, as in / ols y 0 x / bundle b = $model / print b").
That's it for this documentation bug I think, the other things have been fixed.
I have just edited in git the user guide, mentioning Baltagi-Li and also the relevant $model bundle members. Closing this, thanks for the patience.