title: Implementation of Breusch-Pagan test for random effects in plm with unbalanced panels
body: <p>I had a look at how <code>plm</code> (R package for panel models) implements the Breusch-Pagan test for random effects in <code>plmtest()</code> and wonder if it can handle unbalanced panels.</p>
  <p>For unbalanced panels, we need another version of the Breusch-Pagan test for random effects as is given by Baltagi/Li (1990):
  A lagrange multiplier test for the error components model with incomplete panels, Econometric Reviews, 9:1, 103-107, DOI: 10.1080/07474939008800180. As this paper is a bit hard to read, you can also look at how STATA does it: <a href="http://www.stata.com/manuals13/xtxtregpostestimation.pdf" rel="nofollow noreferrer">http://www.stata.com/manuals13/xtxtregpostestimation.pdf</a></p>
  <p><strong>EDIT</strong>
  The modified test allowing for unbalanced panels is now in the package on CRAN (since version 1.6-4).</p>