Dear all

-xtqptest- is now available on SSC, thanks to Kit Baum. It performs the Born & Breitung (2016) bias-corrected LM-based test for serial correlation. It takes the combined residuals (fixed effect + idiosyncratic error; option

It takes on option p, which is the order up to which should be checked for serial correlation. E.g. if p = 3, the null hypothesis is H0: No serial correlation up to order 3. If it is not specified, I set the default to 2 (somewhat arbitrarily).

You can specify as many variables to be tested as you want (it loops internally).

Example usage

Output is at the bottom of this post.

Cheers

Jesse

References

Testing for Serial Correlation in Fixed-Effects Panel Data Models, Benjamin Born and Jörg Breitung, Econometric Reviews 2016

http://www.tandfonline.com/doi/abs/1...38.2014.976524

-xtqptest- is now available on SSC, thanks to Kit Baum. It performs the Born & Breitung (2016) bias-corrected LM-based test for serial correlation. It takes the combined residuals (fixed effect + idiosyncratic error; option

**ue**in predict) as input and returns the Q(p) statistic described on page 1303 of aforementioned paper, as well as the corresponding p-values.It takes on option p, which is the order up to which should be checked for serial correlation. E.g. if p = 3, the null hypothesis is H0: No serial correlation up to order 3. If it is not specified, I set the default to 2 (somewhat arbitrarily).

You can specify as many variables to be tested as you want (it loops internally).

Example usage

Code:

sysuse xtline1, clear xtreg calories, fe predict ue, ue xtqptest ue xtqptest ue, p(1)

Cheers

Jesse

References

Testing for Serial Correlation in Fixed-Effects Panel Data Models, Benjamin Born and Jörg Breitung, Econometric Reviews 2016

http://www.tandfonline.com/doi/abs/1...38.2014.976524

## Comment